File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,15 @@ resources. This context is passed to all normalizers. For example:
102
102
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeNormalizer ` uses
103
103
``datetime_format `` key as date time format;
104
104
* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ AbstractObjectNormalizer `
105
- uses ``empty_iterable_as_object `` to represent empty objects as ``{} `` instead
105
+ uses ``preserve_empty_objects `` to represent empty objects as ``{} `` instead
106
+ of ``[] `` in JSON.
107
+ * :class: `Symfony\\ Component\\ Serializer\\ Serializer `
108
+ uses ``empty_array_as_object `` to represent empty arrays as ``{} `` instead
106
109
of ``[] `` in JSON.
107
110
108
111
.. versionadded :: 5.4
109
112
110
- The usage of the ``empty_array_as_object `` option by default in the
113
+ The usage of the ``empty_array_as_object `` option in the
111
114
Serializer was introduced in Symfony 5.4.
112
115
113
116
You can pass the context as follows::
You can’t perform that action at this time.
0 commit comments