For whom are using Spring Boot, you can configure the default behaviour of Jackson by using the Jackson2ObjectMapperBuilder
.
For example :
@Bean
public Jackson2ObjectMapperBuilder configureObjectMapper() {
Jackson2ObjectMapperBuilder oMapper = new Jackson2ObjectMapperBuilder();
oMapper.failOnUnknownProperties(false);
return oMapper;
}
Then you can autowire the ObjectMapper
everywhere you need it (by default, this object mapper will also be used for http content conversion).