title: How to ignore Json root name in Spring Boot?
body: <p>I have a question regarding Json serialization / deserialization in Spring Boot.</p>
  <p>I have an entity class, what has embedded id:</p>
  <pre><code>@Entity
  @Table(name=&quot;USER_TABLE&quot;)
  @Getter
  @Setter
  public class User {
  
     private UserPK id;
     private String name;
  
  }
  
  /* Getters and Setters excluded */
  public class UserPK implements Serializable {
      private Long userId;
      private Long personalId;
  }
  </code></pre>
  <p>Now if I serialize an object, Spring Boot put a root &quot;id&quot; tag inside JSON. Is it possible to exclude this, and put it into the same level of the name property?</p>
  <p>Actual result:</p>
  <pre><code>{
      &quot;id&quot;:{&quot;userId&quot;:321, &quot;personalId&quot;:222},
      &quot;name&quot;:&quot;John Doe&quot;
  }
  </code></pre>
  <p>Expected result:</p>
  <pre><code>{
      &quot;userId&quot;:321,
      &quot;personalId&quot;:222,
      &quot;name&quot;:&quot;John Doe&quot;
  }
  </code></pre>
  <p>Thank you in advance!</p>