I have a map like so:
@JsonSerialize(contentUsing = MyClassCustomJacksonSerializer.class)
@JsonDeserialize(contentUsing = MyClassCustomJacksonDeserializer.class)
Map<Integer, Map<String, MyClass>> mapA;
I get this exception:
java.util.HashMap cannot be cast to com.whatever.MyClass
How can I register a custom deserializer for the nested object MyClass? "contentUsing" attempts to apply it to the nested map rather than the content of the nested map, that makes sense as the annotation is on the root map, but I see no way to specify it for the nested map?