-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Serializer] Allow to provide (de)normalization context in mapping #14988
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
Comments
Thank you for this issue. |
Not yet. Let me add a section in https://symfony.com/doc/current/components/serializer.html in the upcoming days! |
I'm currently searching for docs about the context attribute. To validate if it maybe can fix my problem I have a subentity and currently it is serialized this way: {
"id": 1,
"subEntity": {
"firstName": "Test",
"lastName": "Test"
}
} instead I want to have it this way: {
"id": 1,
"firstName": "Test",
"lastName": "Test"
} In the JMS Serializer this is done via @ogizanagi is that something which is possible via the context attribute? |
Not yet since the ObjectNormalizer does not support such a feature yet. |
@ogizanagi Thx for your response. Atleast I know that I did not miss something. Still like the |
Friendly ping @ogizanagi. Is there anything I can help you with to document this cool new attribute? |
Sorry, I didn't take the time yet to document this. |
Finally took the time to document this 😅 See #17345 |
The text was updated successfully, but these errors were encountered: