I am trying to deserialize a rather complex POJOs JSON, where I would need to define a specific property-name to type resolution, but yet faild fininding this rather simple feature.
assume a class like:
class Example {
int id;
Map<String,Object> extras;
}
and Jackson is serializing the POJO correctly to JSON where the map is serialized to a key-value map just like expected:
{...
id:5,
extras:{object1:{...}, object2:{...}}
...}
now I would like to tell Jackson to explicitly deserialize the extras objects by their actual type. So I need to tell Jackson somehow to map "object1" to Type A and "object2" to type B.
Is this possible? Thanks.