title: Stop @Jackson from overriding field name
body: <p>I am serializing json to object using Jackson and return it in API response; however, the json file contains different field names than I have in the object , they are not completely different , but there are &quot;_&quot; between words , but in Object field names the field is on word for example , in json file <code>customer_mobile_no</code> in object the filed name is <code>customerMobileNo</code> , however , I am using @JsonProperty annotation on field name, so that Jackson knows the name of the JSON field to map. as @JsonProperty annotation is used for both deserializing and serializing.</p>
  <p>ResponseDto</p>
  <pre><code>    @Builder
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class ResponseDto  {
  @JsonProperty(&quot;customer_mobile_no&quot;)
  private String customerMobileNo;
  }
  </code></pre>
  <p>JsonFile</p>
  <pre><code>&quot;customer_mobile_no&quot; : 011111111
  </code></pre>
  <p>lines used to map from json to object</p>
  <pre><code>  List&lt;ResponseDto&gt; responseDto = mapper.readerForListOf(ResponseDto.class).readValue(json.toString());
  </code></pre>
  <p>the fields' name are returned in response as the same as in Json  ; however , I want to return field name  as the same as in object . I mean I get customer_mobile_no in response , but I want to get field name customerMobileNo : 0111</p>
  <p><a href="https://i.stack.imgur.com/Mv5MJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mv5MJ.png" alt="enter image description here" /></a></p>
  <p>I have tried to use JsonSetter , but it overrides the field name as well .</p>