We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 21622db + 90ff119 commit b3d61c8Copy full SHA for b3d61c8
serializer.rst
@@ -103,7 +103,10 @@ resources. This context is passed to all normalizers. For example:
103
* :class:`Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer` uses
104
``datetime_format`` key as date time format;
105
* :class:`Symfony\\Component\\Serializer\\Normalizer\\AbstractObjectNormalizer`
106
- uses ``empty_iterable_as_object`` to represent empty objects as ``{}`` instead
+ uses ``preserve_empty_objects`` to represent empty objects as ``{}`` instead
107
+ of ``[]`` in JSON.
108
+* :class:`Symfony\\Component\\Serializer\\Serializer`
109
+ uses ``empty_array_as_object`` to represent empty arrays as ``{}`` instead
110
of ``[]`` in JSON.
111
112
You can pass the context as follows::
0 commit comments