java - Jackson Polymorphic Deserialization in Maps -


In the former cases, I have been hosted by the use of Jackson (Jackson 1.9, Kodehaus) format Bhulorfik Dharawahikkrn To sort the list of

{"className": " Index "," id ": 0," fields ": {" classname ":" fieldmap "," df12 ": {" className ":" customing type "," value ":" ra Lf "}}}

Where I have tried some things, along with the rapper implementation of the map ( fieldmap ). Whenever I try to deserialize it, then I

'ID' custom Metatip type 'Maibsetaip "can not be solved type id subtypes < / p>

I have everything annotated Well, that JsonTypeInfo and JsonSubType

included, there is a lot to do The easiest thing is. Let's say you're POJOs

  @JsonTypeInfo (using included = JsonTypeInfo.Id.NAME, or = JsonTypeInfo.As.PROPERTY, property = "className") @ Jesnignorproprtij (Andekhaagyat = true) Public Sector Index Records {Private Ent ID; @JsonTypeInfo (use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "classname") Private map & lt; String, index value & gt; Farm; } @JsonTypeInfo (use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className") @ Jesninjorproprtijh (Andekhaagyat = true) @ Jesntaipanam ( "Anukrmnikawu") public class Index {private String value; }  

When I run the following test harness:

  index index indexRecord = new index record (); Index value iv = new index value (); Iv.setValue ("Ralph"); . IndexRecord.getFields () put ("foo" iv); ObjectMaper ohm = new objectMap (); String data = om.writeValueAsString (indexRecord); System.out.println ("data is" + data); Index results = om.readValue (Data, IndexRecord.class);  

Based on some docs, it seems that I may need to implement custom desililizers.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -