Make BeanDeserializer
consider DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
to avoid buffering
#3643
Labels
2.15
Issues planned for 2.15
performance
Issue related to performance problems or enhancements
to-evaluate
Issue that has been received but not yet evaluated
Currently
BeanDeserializer
has_ignoreAllUnknown
flag but it is only set if per-class annotation@JsonIgnoreProperties(ignoreUnknown = true)
(or its ConfigOverride equivalent) is specified.This flag is used to optimize handling to skip buffering for unknown properties; it would make sense to make it also consider that if
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
is disabled, property value need not be buffered.It'd be good to test detection as well to ensure we know how settings work; perhaps by checking how
BeanDeserializerBuilder
works.Note that we might want to do dynamic check for the flag, instead of modifying
_ignoreAllUnknown
: this because theoretically at leastDeserializationFeature
s may be changed on per-call basis. And since the case of buffering seemingly unknown property value is presumably rare, minor overhead for feature-flag check is probably fine.The text was updated successfully, but these errors were encountered: