8000 [Serializer] Allow to access extra infos in name converters by dunglas · Pull Request #10317 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Serializer] Allow to access extra infos in name converters #10317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 11, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Serializer] Allow to access extra infos in name converters
  • Loading branch information
dunglas committed Sep 10, 2018
commit ca5e2e0acca85b57feefdd4e1ea4f38a3d5c5beb
3 changes: 3 additions & 0 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`::
$companyCopy = $serializer->deserialize($json, Company::class, 'json');
// Same data as $company

It is also possible to access to the current class name, format and context by implementing the
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface` interface.

.. _using-camelized-method-names-for-underscored-attributes:

CamelCase to snake_case
Expand Down
0