title: Java Spring: Jackson deserialization to ZonedDateTime
body: <p>Assuming the following class I want to use for deserialization from an external JSON payload:</p>
  
  <pre><code>public class MyObject {
  
      @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
      private ZonedDateTime timestamp;
  
  }
  </code></pre>
  
  <p>When I'm trying to consume the JSON payload, Jackson throws the following error:</p>
  
  <pre><code>Cannot deserialize value of type `java.time.ZonedDateTime` from String "2019-01-23T12:54:18.610Z": Failed to deserialize java.time.ZonedDateTime: (java.time.format.DateTimeParseException) Text '2019-01-23T12:54:18.610Z' could not be parsed at index 23
  </code></pre>
  
  <p>As you can see, the incoming string is <code>"2019-01-23T12:54:18.610Z"</code>, which is a valid ZonedDateTime as I understand it. Using jshell, parsing that string into a ZonedDateTime using <code>ZonedDateTime.parse("2019-01-23T12:54:18.610Z")</code> results in a valid ZonedDateTime as I would expect.</p>
  
  <ul>
  <li>Why is Jackson failing here?</li>
  <li>What can I do to make it work?</li>
  </ul>
  
  <p>I'm not an expert on Spring or Jackson, either. Thanks.</p>
  
  <p>Edit: I'm using Spring Boot v2.1.1.RELEASE.</p>