title: Jersey-Jackson mapping issue for primitive fields in a user-defined class
body: <p>I am using AngularJS on client side and Java with jersey + jackson for RESTful webservice on server side.</p>
  
  <p>I am using HTTP PUT method to update a record. I am sending a parameter (JSON object) from the angular client application to the java webservice application.</p>
  
  <p>Our POJO class have some primitive numeric fields (long/int) with default 0 value. But upon receiving JSON containing blank string for those fields, <strong>jersey-jackson maps the value of those numeric fields to null and that is not the intended behavior we want to have</strong>.</p>
  
  <p>How to configure the webservice application to map default values (0 for numeric fields) in cases when empty values are sent from the client application?</p>
  
  <p><strong>Sample POJO class at the java webservice project:</strong></p>
  
  <pre><code>@XmlRootElement
  public class modelclass {
      private Long telephoneNumber = 0;
      private Long faxNumber = 0;
      private String name = "";
  public modelclass (String jsonData) {
          ObjectMapper mapper = new ObjectMapper();
          try {
              modelclass pdo = mapper.readValue(jsonData, modelclass.class);
              this.telephoneNumber = pdo.telephoneNumber;
              this.faxNumber = pdo.faxNumber;
              this.name = pdo.name;
          }
  }
  }
  </code></pre>