title: Spring Boot JPA: Storing entity as JSON
body: <p>In my Spring Boot app I have Entity like that:</p>
  
  <pre><code>@Entity
  @Table(name = "UserENT")
  public class User implements Serializable {
  
    @Id
    private String id;
  
    private Data data;
    ...
  </code></pre>
  
  <p>I would like to achieve that object Data will be stored in DB in json format. But it will be mapped on Data object when selecting from DB.</p>
  
  <p>Thanks for any advice.</p>