title: @JsonUnwrapped for Custom Serializer
body: <p>I have a relatively complex object which contains a number of fields.  I need to serialize one of the fields using a custom serializer, but need to emulate the <code>@JsonUnwrapped</code> functionality.</p>
  
  <p>For simplicity's sake I'll cut this down to two fields:</p>
  
  <pre><code>public class MyClass
  {
    @JsonProperty("subject")
    private final String subject;
    @JsonSerialize(using=MySenderSerializer.class)
    private final MailActor sender;
  }
  </code></pre>
  
  <p>and my custom serializer class is as follows:</p>
  
  <pre><code>public class MySenderSerializer extends StdSerializer&lt;MailActor&gt;
  {
    public MySenderSerializer()
    {
      super(MailActor.class, true);
    }
  
    @Override
    public void serialize(final MailActor value, final JsonGenerator gen, final SerializerProvider provider) throws IOException
    {
      gen.writeStringField("from_name", value.getName());
      gen.writeStringField("from_email", value.getAddress());
    }
  }
  </code></pre>
  
  <p>All of this is fine, except that the output JSON looks like this:</p>
  
  <pre><code>{
    ...
    "subject": "test subject",
    "sender": {
      "from_name": "test from",
      "from_email": "test@test.com"
    },
    ...
  }
  </code></pre>
  
  <p>and I need to unwrap the <code>sender</code> field so that the JSON looks like this:</p>
  
  <pre><code>{
    ...
    "subject": "test subject",
    "from_name": "test from",
    "from_email": "test@test.com",
    ...
  }
  </code></pre>
  
  <p>If I was using standard serializers I could use the <code>@JsonUnwrapped</code> annotation to do this, but it doesn't appear to be compatible with custom serializers.  How can I obtain the required JSON output without writing a custom serializer for the <code>MyClass</code> object?</p>