Here you can find the source of getJsonMapper()
public static ObjectMapper getJsonMapper()
//package com.java2s; //License from project: Open Source License import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.text.SimpleDateFormat; public class Main { private static final ThreadLocal<ObjectMapper> mapper = new ThreadLocal<ObjectMapper>() { @Override/*from w ww . j av a 2 s . c o m*/ protected ObjectMapper initialValue() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY); objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd")); return objectMapper; } }; public static ObjectMapper getJsonMapper() { return mapper.get(); } }