title: How to configure objectMapper to not create new instance if fails?
body: <p>I am using objectMapper, configured as:</p>
  
  <pre><code>protected ObjectMapper getCustomMapper() {
      if (this.mapper == null) {
          this.mapper = new ObjectMapper();
          this.mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
          this.mapper.setSerializationInclusion(Inclusion.NON_NULL);
      }
      return this.mapper;
  }
  </code></pre>
  
  <p>And i use it like this:</p>
  
  <pre><code>Email email = this.getCustomMapper().readValue(jsonResponse.toString(),           Email.class)
  </code></pre>
  
  <p>My problem is that if mapping fails, then ObjectMapper returns a new email's instance with all of his attributes null. I wonder if there exists some way to tell ObjectMapper that if he can't map the json then return null, instead of a new instance of the object. Do you know how to do it? Regards</p>
  
  <p>EDIT: my Json input on case success is:</p>
  
  <pre><code>{  
     "user_id":"542d5f15e4b090c7c78c5938",
     "email":"test@gmail.com",
     "is_primary":true,
     "is_confirmed":true,
     "creation_date":"2014-10-02T14:20:05Z",
     "id":"542d5f15e4b090c7c78c5939"
  }
  </code></pre>
  
  <p>and my Json input on case fail is:</p>
  
  <pre><code>{  
     "code":40405,
     "message":"Email not found"
  }
  </code></pre>
  
  <p>And i want that if request fails, then my email object be null. Right now, email response is not null, and all his attributes currently are. </p>