Jackson Change JsonIgnore Dynamically

For serialization, “filtering properties” blog entry should help. Deserialization side has less support, since it is more common to want to filter out stuff that is written.

One possible approach is to sub-class JacksonAnnotationIntrospector, override method(s) that introspect ignorability of methods (and/or fields) to use whatever logic you want.

It might also help if you gave an example of practical application, i.e what and why you are trying to prevent from being deserialized.

Leave a Comment