ジャクソンはフィールドレベルで@JsonIgnoreProperties
アノテーションを持っていますが、素晴らしいですが、いつか大きくなることもあります。@JsonIgnoreOtherPropertiesのようなものはありますか?
@JsonIgnoreProperties({ "name", "phone", ... "20th item"})
private User user;
私のようなものを探しています:だから、これはすべてのフィールドが、電子メールを無視し
@JsonIgnoreOtherProperties("email")
private User user;
。
@JsonIgnoreOtherPropertiesのようなものはありますか?
1))@JsonView
(http://wiki.fasterxml.com/JacksonJsonViews使用: