Jackson has annotations for ignoring unknown properties within a class using:
@JsonIgnoreProperties(ignoreUnknown = true)
It allows you to ignore a specific property using this annotation:
@JsonIgnore
If you'd like to globally set it you can modify the object mapper:
// jackson 1.9 and before
objectMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
// or jackson 2.0
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
How do you set this globally using spring so it can be @Autowired
at server start up without writing additional classes?