fasterxml

Case insensitive JSON to POJO mapping without changing the POJO

China☆狼群 提交于 2019-11-26 11:24:34
问题 Does anyone know how com.fasterxml.jackson.databind.ObjectMapper is able to map JSON properties to POJO properties case insensitive? JSON-String: [{\"FIRSTNAME\":\"John\",\"LASTNAME\":\"Doe\",\"DATEOFBIRTH\":\"1980-07-16T18:25:00.000Z\"}] POJO-Class: 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