我想知道是否有某种方法可以正确反序列化以下内容:
public class MyClass {
Map<String, Serializable> map;
OtherObject object;
[...]
}
ObjectMapper mapper = new ObjectMapper();
MyClass instance = mapper.readValue(someJson, MyClass);
目前,我正在尝试,但我得到了一个例外
com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.io.Serializable: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
莫回无
米琪卡哇伊
相关分类