title: Jackson Parsing for json object inside json
body: <p>I have sample json data like below</p>
  
  <blockquote>
    <p>{"data":{"detection":[{"category":"building","coordinates":{"xmin":"0.31","ymin":"0.42","ymax":"0.82","xmax":"0.89"},"accuracy":"0.66"}]}}</p>
  </blockquote>
  
  <p>Trying to parse data field in jackson parser and created ObjectCategories class(setter getter) for its values. </p>
  
  <pre><code>@JsonProperty("categories")
  private List&lt;ObjectCategory&gt; categories;
  
  @SuppressWarnings("unchecked")
  @JsonProperty(DATA)
  private void unpackNested(Map&lt;String,Object&gt; data) {
      this.categories = (ArrayList&lt;ObjectCategory&gt;) data.get("detection");
  }
  </code></pre>
  
  <p>If we execute the above code, getting this exception -  <em>getCategories().get(0).getAccuracy()</em> to <em>java.util.LinkedHashMap cannot be cast to ObjectCategory</em> </p>
  
  <p><em>getCategories().get(0)</em> returns Map value. How to parse with my ObjectCategory class.</p>