title: Case insensitive JSON to POJO mapping without changing the POJO
body: <p>Does anyone know how com.fasterxml.jackson.databind.ObjectMapper is able to map JSON properties to POJO properties case insensitive?</p>
  
  <p>JSON-String:</p>
  
  <blockquote>
    <p>[{"FIRSTNAME":"John","LASTNAME":"Doe","DATEOFBIRTH":"1980-07-16T18:25:00.000Z"}]</p>
  </blockquote>
  
  <p>POJO-Class:</p>
  
  <pre><code>public class Person {
  
      private String firstName;
      private String lastName;
      private Date dateOfBirth;
  
      public String getFirstName() {
          return firstName;
      }
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
      public String getLastName() {
          return lastName;
      }
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
      public Date getDateOfBirth() {
          return dateOfBirth;
      }
      public void setDateOfBirth(Date dateOfBirth) {
          this.dateOfBirth = dateOfBirth;
      }
  }
  </code></pre>
  
  <p>Test-Class:</p>
  
  <pre><code>@Test
  public final void testDeserializingPersonJsonToPersonClass()
          throws JsonParseException, JsonMappingException, IOException {
      final String jsonAsString = "[{\"FIRSTNAME\":\"John\",\"LASTNAME\":\"Doe\",\"DATEOFBIRTH\":\"1980-07-16T18:25:00.000Z\"}]";
      final ObjectMapper mapper = new ObjectMapper();
  
      final Person person = mapper.readValue(jsonAsString, Person.class);
  
      assertNotNull(person);
      assertThat(person.getFirstName(), equalTo("John"));
  }
  </code></pre>
  
  <p>This ends up in following error:<br>
  com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of ...</p>
  
  <p>It's not possible to change neither JSON-String nor POJO-Class.</p>