jackson filter properties without annotations
问题 public Class User { private String name; private Integer age; ... } ObjectMapper om = new ObjectMapper(); om.writeValueAsString(user); How can I filter properties without using any annotations like @JsonIgnore? 回答1: You have two possible ways using Jackson Mixin Annotations :- http://www.cowtowncoder.com/blog/archives/2009/08/entry_305.html JSON Filter :- http://wiki.fasterxml.com/JacksonFeatureJsonFilter 回答2: The example of excluding properties by name: public Class User { private String