title: How to deserialize Jackson Json NULL String to Date with JsonFormat
body: <p>I have looked a lot but still couldn't get the answer so far, any help is really appreciated!</p>
  
  <p>I have a simple <code>String</code> to <code>Date</code> field mapping and try to read a JSON string to Java object. </p>
  
  <pre><code>@JsonInclude(value=Include.NON_EMPTY)
  @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="dd-MMM-yyyy", timezone="PST")
  protected Date eolAnnounceDate;
  </code></pre>
  
  <p>However I am getting the following exception if the JSON string value is empty.
  Can you someone tell me how to get around this? I have tried a few options but they are all for serialization.</p>
  
  <pre><code>ObjectMapper objectMapper = new ObjectMapper();   
  objectMapper.setSerializationInclusion(Include.NON_NULL); 
  objectMapper.setSerializationInclusion(Include.NON_EMPTY);
  </code></pre>
  
  <p>Exception :</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: Failed to parse Date value 'NULL' (format: &quot;dd-MMM-yyyy&quot;): Unparseable date: &quot;NULL&quot;
        com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateBasedDeserializer._parseDate(DateDeserializers.java:180)
        com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:279)
        com.fasterxml.jackson.databind.deser.std.DateDeserializers$DateDeserializer.deserialize(DateDeserializers.java:260)
        com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
        com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:98)
        com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
        com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
        com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:230)
        com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:207)
        com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:23)
        com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
        com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:98)
        com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
        com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
        com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)
        com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
        com.cisco.cre.dao.impl.ElasticsearchDAOImpl.getListByIdsFilter(ElasticsearchDAOImpl.java:94)</p>
  </blockquote>
  
  <p>Thanks
  - Atul</p>