I have a json file which looks like this:
{ \"ANIMALS\": { \"TYPE\": \"MAMMAL\", \"COLOR\": \"BLACK\", \"HEIGHT\": \"45\", } } >
{ \"ANIMALS\": { \"TYPE\": \"MAMMAL\", \"COLOR\": \"BLACK\", \"HEIGHT\": \"45\", } }
If you are not generating the JSON (serialisation), but you want to consume an object without having to care about the case.
You can receive Animal or AniMal :
ObjectMapper mapper = new ObjectMapper(); mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);