Skip to content

Commit e384239

Browse files
committed
Tweaks
1 parent abc5d28 commit e384239

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

serializer.rst

+5-4
Original file line numberDiff line numberDiff 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

15811582
Handling Uninitialized Properties
15821583
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)