I hope you'll bear with me here, I'm not sure I'm following you. You say that the type property should be set to the type of the values in the map, however that is not what is printed when I serialize...
{
"type" : "Jackson",
"map" : {
"type" : "DataValueMap",
"key1" : {
"type" : "DataValue",
"value" : "name1"
}
}
}
Another requirement here is that I can't annotated the IDataValue or IDataValueMap interfaces/classes. So to be polymorphic, how do i do this without using addAbstractTypeMapping(), which would not provide full polymorphism anyway.
And finally, just to clarify a bit, I've moved my JsonTypeInfo to separate Mixins class so I don't confuse things. That doesn't make a difference does it? Thanks.
Read full article from Deserializing subclass of map fails when field is defined as an interface · Issue #95 · FasterXML/jackson-core · GitHub
No comments:
Post a Comment