title: Jackson @JsonProperty create duplicate name
body: <p>I have a class </p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  import javax.persistence.CascadeType;
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.FetchType;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.JoinColumn;
  import javax.persistence.OneToMany;
  import javax.persistence.OneToOne;
  import javax.persistence.Table;
  
  import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  import com.fasterxml.jackson.annotation.JsonProperty;
  
  import lombok.Data;
  
  @Entity
  @JsonIgnoreProperties(ignoreUnknown = true)
  @Table(name = "Sheduler")
  public @Data class Lesson {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      @Column(name = "id", updatable = false, nullable = false)
      public int id;
  
      String state;
      String goal;
      String hobby;
      String result;
      String interest;
  
      @JsonProperty("fStudentRequest") 
      boolean fStudentRequest;
      @JsonProperty("fTeacherConfirm") 
      boolean fTeacherConfirm;
      @JsonProperty("fStudentConfirm") 
      boolean fStudentConfirm;
  
      @OneToOne(
              cascade = CascadeType.ALL, 
              orphanRemoval = true,
              fetch = FetchType.LAZY
      )
      @JoinColumn(name = "student_id")
      AuthorisedUser student; 
  
      @OneToOne(
              cascade = CascadeType.ALL, 
              orphanRemoval = true,
              fetch = FetchType.LAZY
      )
      @JoinColumn(name = "teacher_id")
      AuthorisedUser teacher; 
  
      @OneToMany(
              cascade = CascadeType.ALL, 
              orphanRemoval = true,
              fetch = FetchType.LAZY
      )
      @JoinColumn(name = "order_id")
      List&lt;Robokassa&gt; robokassa = new ArrayList&lt;&gt;();  
  
      @OneToMany(
          cascade = CascadeType.ALL, 
          orphanRemoval = true,
          fetch = FetchType.EAGER, 
          mappedBy = "sheduler"
      )
      List&lt;LessonDays&gt; days = new ArrayList&lt;&gt;();  
  }
  </code></pre>
  
  <p>To serialise result I use additional class</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  
  import com.fasterxml.jackson.core.JsonProcessingException;
  import com.fasterxml.jackson.databind.ObjectMapper;
  import com.fasterxml.jackson.databind.SerializationFeature;
  
  import lombok.Data;
  import play.Logger;
  public @Data class HttpJsonResponse&lt;T&gt; {
  
  
      int status;
      String message;
      List&lt;T&gt; data = new ArrayList&lt;&gt;();
      int code;
  
      public static &lt;T&gt; String createUserResponse(T data,String message,int code,int status){
          try {
              ObjectMapper mapper = new ObjectMapper();
              mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
              HttpJsonResponse&lt;T&gt; response = new HttpJsonResponse&lt;T&gt;();
              response.setStatus(status);
              response.setCode(code);
              response.getData().add(data);
              response.setMessage(message);
              Logger.debug(mapper.writeValueAsString(response));
              return mapper.writeValueAsString(response);
          } catch (JsonProcessingException e) {
              Logger.error(e.toString());
              return "{\"status\":0,\"data\":[],\"code\":\"901\",\"message\":\"error\"}";     
          }
      }
  }
  </code></pre>
  
  <p>When I serialize Lesson class I get duplicated fields</p>
  
  <pre><code>String result = HttpJsonResponse
                  .createUserResponse(
                      lessons,
                      "find "+lessons.size(),
                      CODE_OK,
                      STAUS_OK
                  );
  </code></pre>
  
  <p>Sorry for this but I cannot add more code in my post</p>
  
  <pre><code>{
     "status":1,
     "message":"find 1",
     "data":[
        [
           {
              "id":4565,
              "state":"4",
              "goal":"4",
              "hobby":"hobby",
              "result":"result",
              "interest":"4",
              "student":{
                 "id":0,
                 "email":null,
                 "password":null,
                 "md5":"e22175516bc91b167e80ceae7276d83b",
                 "hash":null,
                 "tags":null,
                 "emotions":null,
                 "balance":0.0,
                 "hibernateLazyInitializer":{
  
                 }
              },
              "teacher":{
                 "id":0,
                 "email":null,
                 "password":null,
                 "md5":"e22175516bc91b167e80ceae7276d83b",
                 "hash":null,
                 "tags":null,
                 "emotions":null,
                 "balance":0.0,
                 "hibernateLazyInitializer":{
  
                 }
              },
              "robokassa":null,
              "days":[
                 {
                    "id":4558,
                    "from":"10:00",
                    "to":"10:45",
                    "fselect":true,
                    "fSelect":true
                 },
                 {
                    "id":4559,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4560,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4561,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4562,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4563,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4564,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4566,
                    "from":"10:00",
                    "to":"11:00",
                    "fselect":true,
                    "fSelect":true
                 },
                 {
                    "id":4567,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4568,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4569,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4570,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4571,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 },
                 {
                    "id":4572,
                    "from":null,
                    "to":null,
                    "fselect":false,
                    "fSelect":false
                 }
              ],
              "fteacherConfirm":true,
              "fstudentConfirm":true,
              "fstudentRequest":true,
              "fStudentRequest":true,
              "fTeacherConfirm":true,
              "fStudentConfirm":true
           }
        ]
     ],
     "code":500
  }
  </code></pre>
  
  <p>What should I do to remove duplicates and get field like fStudentConfirm</p>