New DeserializationFeature IGNORE_UNKNOWN_PROPERTIES · Issue #3721 · FasterXML/jackson-databind (original) (raw)

DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is enabled by default but when disabled, Jackson can waste a lot of processing time on the unknown properties.

Would it be possible to add DeserializationFeature.IGNORE_UNKNOWN_PROPERTIES (default=false)? This setting only matters if DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is false.

I know we can the annotation @JsonIgnoreProperties(ignoreUnknown = true) to classes but adding annotations to classes is not always feasible and in the case of Scala, the generated Java classes may not map 1:1 to the original Scala class.