You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had hoped that annotation of a field with @JsonProperty(required=true) would cause an exception to be thrown during de-serialization if the field was missing from the Json.
But it appears to be ignored.
Is there a work around?
The text was updated successfully, but these errors were encountered:
No, this is only used for decorating JSON schemas, and deserializer does not make any use of it.
Since handling of annotations is implemented in databind, there is an RFE here:
for possibly adding support; this has been requested, and although Jackson will NOT add general validation of input (that's what Java Bean Validation API is for), simple required check seems like a reasonable minimal check to add.
I had hoped that annotation of a field with @JsonProperty(required=true) would cause an exception to be thrown during de-serialization if the field was missing from the Json.
But it appears to be ignored.
Is there a work around?
The text was updated successfully, but these errors were encountered: