class test {
private String s;
private Date d;
}
使用setExcludes过滤不需要转换的属性
JsonConfig cfg = new JsonConfig();
cfg.setExcludes(new String[] { "d" });
本文介绍了一个简单的Java类,并展示了如何使用JsonConfig对象来设置排除项,从而在序列化过程中忽略特定字段。
class test {
private String s;
private Date d;
}
使用setExcludes过滤不需要转换的属性
JsonConfig cfg = new JsonConfig();
cfg.setExcludes(new String[] { "d" });

被折叠的 条评论
为什么被折叠?
