I’m having a trouble desirializing POJO objects that contains sets
e.g.
class C {
Set<SomeObject> set;
...
}
Using Jackson 1.8 auto mapping, I get all properties correctly, but if I use a set I get this
org.codehaus.jackson.map.JsonMappingException:
Unexpected token (START_OBJECT),
expected VALUE_STRING: need JSON
String that contains type id (for
subtype of java.util.Set)
Any Ideas what I’m doing wrong? is Generics in type / type erasure is the culprit? how do I fix it then?
Disclaimer, I’m using Hibernate persistent entities when I’m serializing and deserializing is out of session
Structure of JSON data differs from structure of POJO; if you can include JSON here it should be easy to figure out where exactly mismatch occurs. Sets should be handled just fine, but they need to match with JSON arrays.