File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1571,12 +1571,13 @@ to ``true``::
1571
1571
]);
1572
1572
// $jsonContent contains {"name":"Jane Doe"}
1573
1573
1574
- Preserving Empty Objetcs
1574
+ Preserving Empty Objects
1575
1575
~~~~~~~~~~~~~~~~~~~~~~~~
1576
1576
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 ``{} ``.
1580
1581
1581
1582
Handling Uninitialized Properties
1582
1583
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments