Skip to content

Commit b5aa4e9

Browse files
committed
add note in DiscriminatorMap section
1 parent cf8cc5b commit b5aa4e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/serializer.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,6 +1829,11 @@ and ``BitBucketCodeRepository`` classes:
18291829
</class>
18301830
</serializer>
18311831
1832+
.. note::
1833+
1834+
The values of the array parameter `mapping` should be strings.
1835+
Otherwise, it will implicitly be cast into strings.
1836+
18321837
Once configured, the serializer uses the mapping to pick the correct class::
18331838

18341839
$serialized = $serializer->serialize(new GitHubCodeRepository(), 'json');

0 commit comments

Comments
 (0)