User user = new User();user.setId(1L);user.setAge(12);user.setName("zhangsan");user.setBirthDate(new Date());String jsonString1 = JSON.toJSONString(user);System.out.println(jsonString1);SimplePropertyPreFilter filter = new SimplePropertyPre
输出结果
{"id":1,"na":"zhangsan","address":null,"birthDate":"2018-01-08 14:24:28"}{"na":"zhangsan","address":null}上面是在代码中体现的过滤数据,下面直接使用注解
1.@JSONField(serialize = false)
2.@JsonIgnore