@JsonIgnoreProperties
with @JsonTypeInfo(include = JsonTypeInfo.As.EXTERNAL_PROPERTY)
does not work
#4185
Closed
1 task done
Labels
has-failing-test
Indicates that there exists a test case (under `failing/`) to reproduce the issue
Milestone
Search before asking
Describe the bug
When using @JsonIgnoreProperties at the parent level of a Child configured with a polymorphic SubChild using EXTERNAL_PROPERTY jackson is unable to deserialize valid JSON.
The given reproduction example throws the following exception:
Interestingly when the Bug first occurred in our Application the Exception was the following:
After debugging. It seems with the added @JsonIgnoreProperties the BeanDeserializer is not resolved properly. The DeserializerCache is not called at all for the Child class. Therefore the special handling of the ExternalTypeHandler is not applied.
Version Information
2.15.3
Reproduction
Expected behavior
@JsonIgnoreProperties should not intefer with @JsonTypeInfo
Additional context
Using @JsonTypeInfo( include = JsonTypeInfo.As.PROPERTY) works fine.
The text was updated successfully, but these errors were encountered: