File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ defines a ``Person`` entity with a ``firstName`` property:
627627 This custom mapping is used to convert property names when serializing and
628628deserializing objects::
629629
630- $serialized = $serializer->serialize(new Person("Kévin"));
630+ $serialized = $serializer->serialize(new Person("Kévin"), 'json' );
631631 // {"customer_name": "Kévin"}
632632
633633Serializing Boolean Attributes
@@ -1499,7 +1499,7 @@ and ``BitBucketCodeRepository`` classes:
14991499
15001500 Once configured, the serializer uses the mapping to pick the correct class::
15011501
1502- $serialized = $serializer->serialize(new GitHubCodeRepository());
1502+ $serialized = $serializer->serialize(new GitHubCodeRepository(), 'json' );
15031503 // {"type": "github"}
15041504
15051505 $repository = $serializer->deserialize($serialized, CodeRepository::class, 'json');
You can’t perform that action at this time.
0 commit comments