Skip to content

Commit 33c85ee

Browse files
committed
add reference in the serializer docs
1 parent c5e5831 commit 33c85ee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

serializer.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ you need it or it can be used in a controller::
4141
}
4242
}
4343

44+
.. versionadded:: 5.3
45+
46+
A ``serialize`` filter was introduced in Symfony 5.3 that uses the Serializer
47+
component.
48+
49+
.. code-block:: twig
50+
51+
{{ object|serialize(format = 'json') }}
52+
53+
See the :doc:`twig reference </reference/twig_reference>` for
54+
more information.
55+
56+
4457
Adding Normalizers and Encoders
4558
-------------------------------
4659

0 commit comments

Comments
 (0)