java - Jackson custom deserializer for one field with polymorphic types - Stack Overflow
I tried to debug in jackson source code and find out that in the method
deserialize(JsonParser jp, DeserializationContext ctxt)
of
SettableBeanProperty.java
when the _valueTypeDeserializer
isn't null, it will never use _valueDeserializer
.
Is this a correct assumption that TypeDeserializer should be more proper than ValueDeserializer?
I'm trying to use @JsonDeserialize
to define custom deserializer for one field with polymorphic types. I can succeed to use @JsonDeserialize
and @JsonTypeInfo
seperately. But when i use them together, it seems that the @JsonDeserialize
annotation is ignored.
Read full article from java - Jackson custom deserializer for one field with polymorphic types - Stack Overflow
No comments:
Post a Comment