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 @@ -625,7 +625,7 @@ defines a ``Person`` entity with a ``firstName`` property:
625625 This custom mapping is used to convert property names when serializing and
626626deserializing objects::
627627
628- $serialized = $serializer->serialize(new Person("Kévin"));
628+ $serialized = $serializer->serialize(new Person("Kévin"), 'json' );
629629 // {"customer_name": "Kévin"}
630630
631631Serializing Boolean Attributes
@@ -1450,7 +1450,7 @@ and ``BitBucketCodeRepository`` classes:
14501450
14511451 Once configured, the serializer uses the mapping to pick the correct class::
14521452
1453- $serialized = $serializer->serialize(new GitHubCodeRepository());
1453+ $serialized = $serializer->serialize(new GitHubCodeRepository(), 'json' );
14541454 // {"type": "github"}
14551455
14561456 $repository = $serializer->deserialize($serialized, CodeRepository::class, 'json');
You can’t perform that action at this time.
0 commit comments