title: Jackson Deserialization of dynamic data fails,
body: <pre><code>public class Baseproperties
  {
  @JsonProperty("id")
  private String id ;
  private Integer ccode;
  //...set and geters
  }
  
  
  public class Person
  {
  @JsonProperty("name")
  private String name ;
  private Integer age;
  @JsonProperty("props")
  private Baseproperties bprop;
  //...set and geters
  }
  
  
  public class Cars
  {
  @JsonProperty("model")
  private String Model ;
  private Integer yearOfMake;
  @JsonProperty("props")
  private Baseproperties bprop;
  //...set and geters
  }
  
  public MessageWrapper
  {
  @JsonProperty("ct")
  private String classType;
  private Object data;
  //...set and geters
  }
  </code></pre>
  
  <p>I need to serialise MessageWrapper class to json, but the approach fails due to unable to desearialize the Object data;
  here i am reading the classType and desearializing it to either Person or CarType </p>
  
  <p>//Person
  {
    "name": "arnold",
    "age": 21
  }</p>
  
  <p>//car
  {
    "model": "Moriz",
    "yearOfMake": 1892
  }</p>
  
  <pre><code>//example MessageWrapper
  String s= "{
    "ct": "&lt;packagename&gt;.car",
    "data": {
        "model": "Moriz",
        "yearOfMake": 1892
        "props":{
        "id" : "12312",
        "ccode" :33
        }
      }
  
  }"
  
  mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
  MessageWrapper mw = mapper.readValue(s, MessageWrapper.class);
  if(mw.getclassType().toString().equals("&lt;packagename&gt;.car"))
  Cars cw = mapper.readValue(mw.getData(), Cars.class);
  but cw is wrong // serialise fails.
  </code></pre>