-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Currently required property of @JsonProperty is only provided as metadata, and used for creating things like JSON Schemas. Deserialization does not enforce required-ness due to technical difficulties; specifically, since JsonDeserializer instances can not have state (they are shared and need to be stateless), any state needs to be either stored in DeserializationContext somehow, or carried along as extra parameter throughout internal calls within BeanDeserializer.
However: handling of Creator methods is different in that state is already tracked: values of Creator parameters must be buffered, to be passed when everything has been collected. Adding bit of extra tracking and checking for required-ness should be much less work.
The initial implementation could just use required property; and once this works, additional functionality for per-creator/global-defaults (DeserializationFeature) may be considered as well.