Jackson ObjectMapper 101

Jackson is a JSON processing library for Java. The code below will create an object mapper outputting JSON in pretty format and have case insensitive fields.

ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);

Jackson Wiki containing additional features: