Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a global Jackson setting for @JsonIgnoreProperties(unknown=true)?

Is there a global Jackson setting/configuration so that I do not have to annotate every class with @JsonIgnoreProperties(unknown=true)?

like image 990
necromancer Avatar asked Apr 29 '13 04:04

necromancer


1 Answers

This should do the job:

objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

See the APIs for ObjectMapper and DeserializationFeature for more information.

like image 62
nutlike Avatar answered Oct 21 '22 22:10

nutlike