title: Use jackson annotation JsonUnwrapped on a field with name different from its getter
body: <p>I have a class like:</p>
  
  <pre><code>class Car {
      private Engine myEngine;
  
      @JsonProperty("color")
      private String myColor;  
  
      @JsonProperty("maxspeed")
      private int myMaxspeed;
  
      @JsonGetter("color")
      public String getColor()
      {
          return myColor;
      }
  
      @JsonGetter("maxspeed")
      public String getMaxspeed()
      {
          return myMaxspeed;
      }
  
      public Engine getEngine()
      {
          return myEngine;
      }
  }
  </code></pre>
  
  <p>and Engine class like</p>
  
  <pre><code>class Engine {
      @JsonProperty("fueltype")
      private String myFueltype;
  
      @JsonProperty("enginetype")
      private String myEnginetype;
  
      @JsonGetter("fueltype")
      public String getFueltype()
      {
          return myFueltype;
      }
  
      @JsonGetter("enginetype")
      public String getEnginetype()
      {
          return myEnginetype;
      }
  }
  </code></pre>
  
  <p>I want to convert the Car object to JSON using Jackson with structure like</p>
  
  <pre><code>'car': {
     'color': 'red',
     'maxspeed': '200',
     'fueltype': 'diesel',
     'enginetype': 'four-stroke'
   } 
  </code></pre>
  
  <p>I have tried answer provided in <a href="https://stackoverflow.com/questions/16654208/convert-json-many-objects-to-single-json-using-jackson">this</a> but it doesn't work for me as field names are different then getter</p>
  
  <p>I know I can use @JsonUnwrapped  on engine if field name was engine. But how to do in this situation.</p>