File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 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:
102102* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeNormalizer ` uses
103103 ``datetime_format `` key as date time format;
104104* :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
106109 of ``[] `` in JSON.
107110
108111.. versionadded :: 5.4
109112
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
111114 Serializer was introduced in Symfony 5.4.
112115
113116You can pass the context as follows::
You can’t perform that action at this time.
0 commit comments