Closed Yoztastic closed 11 years ago
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:
https://github.com/FasterXML/jackson-databind/issues/230
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?