-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
On deserialization consider allowing fields in other views to be considered as unknown properties instead of silently ignoring them #4108
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
I think we would consider a new |
Just stoppying by with naming ideas 😆
|
I like the first option! |
Ok, so this is dup of #437 so will close, but will be allowed with new |
Consider the following class
When deserializing the following JSON, an error will be raised as
potato
is an unknown property.When deserializing the following JSON with
View1
, I would expect to get a similar error as before, statingview2Field
is an unknown property, but instead it simply gets ignored (the field is set to null).I tried enabling
FAIL_ON_IGNORED_PROPERTIES
but it didn't seem to affect this situation. Is this something that would be possible? Either viaFAIL_ON_IGNORED_PROPERTIES
or some other configuration?This is helpful when we want to do versioning on a DTO in a declarative manner, for example.
The text was updated successfully, but these errors were encountered: