title: How to deserialize diffrents formats of date: YYYY-MM-DD and YYYY-MM
body: <p>I have list of json objects,one of the fields is date. The problem is that the dates are written in diffrent ways in json.</p>
  
  <p>most of them looks like: </p>
  
  <pre><code> "publishedDate": "2005-01-28"
   "publishedDate": "2011-08-29"
   "publishedDate": "2016-04-19"
  </code></pre>
  
  <p>But some of them is like:</p>
  
  <pre><code>"publishedDate": "1998-11"
  "publishedDate": "2001-01"
  </code></pre>
  
  <p>My java object field to which i want to parse</p>
  
  <pre><code>private Date publishedDate;
  </code></pre>
  
  <p>I got this error:</p>
  
  <pre><code> Cannot deserialize value of type `java.util.Date` from String "2001-01": not a valid representation (error: Failed to parse Date value '2001-01': Cannot parse date "2001-01": while it seems to fit format 'yyyy-MM-dd', parsing fails (leniency? null))
  </code></pre>