title: How do you specify default values for Jackson deserialization
body: <pre><code>@ResponseBody
  @RequestMapping(value="/getUser")
  public JSONObject getContent(@ReqeustBody User user) 
  </code></pre>
  
  <p>Up here is my Controller code.</p>
  
  <pre><code>@Data
  public class User{
      private String username = "administrator";
      private String password = "123456";   
      private Integer age = 18;
  }
  </code></pre>
  
  <p>Up here is my <code>User</code> class code.</p>
  
  <pre><code>{
      "username":"admin",
      "password":"000",
      "age":""
  }
  </code></pre>
  
  <p>When I <code>POST</code> the <code>JSON</code> above, I get the <code>age</code> property to be <code>null</code>.</p>
  
  <p>I want <code>Jackson</code> to deserialize the empty fields (<code>""</code> or <code>null</code>) in <code>JSON</code> with default values. </p>
  
  <p>Like this: </p>
  
  <pre><code>{
      "username":"admin",
      "password":"000",
      "age":18
  }
  </code></pre>
  
  <p>What should I do?</p>