use of io.dropwizard.jackson.FuzzyEnumModule in project keywhiz by square.
the class JsonHelpers method customizeObjectMapper.
/**
* Customized ObjectMapper for common settings.
*
* @return customized object mapper
*/
private static ObjectMapper customizeObjectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new Jdk8Module());
mapper.registerModule(new GuavaModule());
mapper.registerModule(new LogbackModule());
mapper.registerModule(new GuavaExtrasModule());
mapper.registerModule(new FuzzyEnumModule());
mapper.setPropertyNamingStrategy(new AnnotationSensitivePropertyNamingStrategy());
mapper.setSubtypeResolver(new DiscoverableSubtypeResolver());
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
return mapper;
}
Aggregations