title: Jackson, move dynamic property value one level up
body: <p>I have problem with modelling server responses, some of them look like that: </p>
  
  <pre><code>{
      "_links":{
          "self":{
              "href":"http:\/\/example.com"
          }
      },
      "_embedded":{
          "category":{
             &lt;...data...&gt;
          }
      }
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{
      "_links":{
          "self":{
              "href":"http:\/\/example.com"
          }
      },
      "_embedded":{
          "episodes":[
             &lt;...list_data...&gt;
          ]
      }
  }
  </code></pre>
  
  <p>It seems that "_embedded" property has only one JSON object and that object has only one property ( named differently ) with actual data.</p>
  
  <p>I would like to create some kind of generic POJO class to support those kind of responses, something like:</p>
  
  <pre><code>public abstract class EmbeddedResponse&lt;T&gt; {
  
      @JsonProperty("_embedded")
      private T embedded;
  
      public T getEmbedded() {
          return embedded;
      }
  
      ... &lt;other_members&gt; ...
  }
  
  public class CategoriesResponse extends EmbeddedResponse&lt;List&lt;Category&gt;&gt; {
  
  }
  </code></pre>
  
  <p>Where calling 'getEmbedded()' would return list of categories ( or episodes, or anything ).</p>
  
  <p>I am working with custom deserialization now, but without much success, I would like to keep code base minimal.</p>