Skip to content

Commit b89995c

Browse files
committed
minor #20457 [Serializer] Add missing argument (famoser)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] Add missing argument In the example, the `$context` is constructed, but then forgot to be passed to the `serializer`. This functionality is first documented in 6.4, hence I target this branch. Commits ------- d94be3f Add missing argument
2 parents 6096fec + d94be3f commit b89995c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ property. This can be used instead of
18181818
},
18191819
],
18201820
];
1821-
$jsonContent = $serializer->serialize($person, 'json');
1821+
$jsonContent = $serializer->serialize($person, 'json', $context);
18221822
// $jsonContent contains {"name":"cordoval","age":34,"createdAt":"2014-03-22T09:43:12-0500"}
18231823

18241824
Advanced Deserialization

0 commit comments

Comments
 (0)