对象转Json字符串时、使用JackSon来操作属性
1.响应json时排除对象中,属性值为Null,的属性。在Bean类上加@JsonInclude(JsonInclude.Include.NON_NULL)@JsonInclude(JsonInclude.Include.NON_NULL)public class Video { private Integer id; //id private String title; //标题 private String intro; //简介 ........ }.