title: JAX-RS and java.time.LocalDate as input parameter
body: <p>Problem using JAX-RS and <code>java.time.LocalDate</code> (java8).</p>
  
  <p>I want to pass an object like this into a JAX-RS method using JSON:</p>
  
  <pre><code>Person {
    java.time.LocalDate birthDay;
  }
  </code></pre>
  
  <p>The exception I get is:</p>
  
  <blockquote>
    <p><code>com.fasterxml.jackson.databind.JsonMappingException</code>: No suitable constructor found for type [simple type, class <code>java.time.LocalDate</code>]: can not instantiate from JSON object (need to add/enable type information?) at [Source: <code>io.undertow.servlet.spec.ServletInputStreamImpl@21cca2c1</code>; line: 2, column: 3]</p>
  </blockquote>
  
  <p>How can I create some kind of an interceptor that maps json-dates to <code>java.time.LocalDate</code>? I have tried implemented a <code>MessageBodyReader</code>, but if the <code>LocalDate</code> is a <em>field</em> in another class, I have to write a <code>MessageBodyReader</code> for each class holding a <code>LocalDate</code> (as far as I've understood).</p>
  
  <p>(Java EE7 (only using the javaee-api and don't want any third party dependencies), JAX-RS, Java 8, Wildfly 8.2)</p>
  
  <p>Any suggestions?</p>