File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1571,12 +1571,13 @@ to ``true``::
15711571 ]);
15721572 // $jsonContent contains {"name":"Jane Doe"}
15731573
1574- Preserving Empty Objetcs
1574+ Preserving Empty Objects
15751575~~~~~~~~~~~~~~~~~~~~~~~~
15761576
1577- By default, the Serializer will transform an empty array to `[] `.
1578- You can change this behavior by setting the ``AbstractObjectNormalizer::PRESERVE_EMPTY_OBJECTS `` context option
1579- to ``true ``, when the value is `\ArrayObject() ` the serialization would be `{} `.
1577+ By default, the Serializer transforms an empty array to ``[] ``. You can change
1578+ this behavior by setting the ``AbstractObjectNormalizer::PRESERVE_EMPTY_OBJECTS ``
1579+ context option to ``true ``. When the value is an instance of ``\ArrayObject() ``,
1580+ the serialized data will be ``{} ``.
15801581
15811582Handling Uninitialized Properties
15821583~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments