title: handle Null and Default values in @RequestBody with Jackson
body: <p>I have timezone POJO as below:</p>
  
  <pre><code>@Entity
  public class TimeZoneDto implements Serializable {
      private static final long serialVersionUID = 1L;
      @Id
      @Column(name = "id", nullable = false)
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "timezone_sequence")
      @SequenceGenerator(name = "timezone_sequence", sequenceName = "t_timeZone_master_id_seq", initialValue = 1, allocationSize = 1)
      private Long id;
      @Column
      private String timeZone;
      @Column
      private String name;
      @Column
      private double hourDifference;
      /* all gettet/setter */
  }
  </code></pre>
  
  <p>I have updateTimeZone method in Spring Controller as below:</p>
  
  <pre><code>@RequestMapping(value = "updateTimezone", consumes = "application/json", produces = "application/json", method = RequestMethod.POST)
  
      public ResponseEntity&lt;Object&gt; updateTimezone(@RequestBody TimeZoneDto timeZoneDto){
  
  }
  </code></pre>
  
  <p>when I pass request as below:</p>
  
  <pre><code>{"id":14,"name":"America/Los_Angeles -7:00 GMT"}
  </code></pre>
  
  <p>then it automatically convert other values with default values when map with POJO and it becomes:</p>
  
  <pre><code>id=14, timeZone=null, name=America/Los_Angeles -7:00 GMT, hourDifference=0.0
  </code></pre>
  
  <p>because of this when I update this POJO as below</p>
  
  <pre><code>getEntityManager().merge(timezoneDto);
  </code></pre>
  
  <p>it override TimeZone = null and hourDifference = 0.0 automatically,</p>
  
  <p>so is there any way by which my TimeZoneDto in @RequestBody has only those columns which I pass in request JSON.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have used below on Class but its not work</p>
  
  <pre><code>  @JsonInclude(value=Include.NON_EMPTY)
                   OR  
    @JsonInclude(value=Include.NON_DEFAULT)
  </code></pre>