10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d14a32a commit fbc35cfCopy full SHA for fbc35cf
components/serializer.rst
@@ -416,7 +416,7 @@ key in the ``context`` parameter of the desired serializer method::
416
$encoder = new JsonEncoder();
417
418
$serializer = new Serializer([$normalizer], [$encoder]);
419
- $serializer->serialize($person, 'json', ['ignored_attributes' => 'age']); // Output: {"name":"foo"}
+ $serializer->serialize($person, 'json', ['ignored_attributes' => ['age']]); // Output: {"name":"foo"}
420
421
.. deprecated:: 4.2
422
0 commit comments