fastjson
fastjson copied to clipboard
字段丢失
public class Hotspot extends BaseEntity { private static final long serialVersionUID = 1L;
private String title;
private CpGame game;
private String url;
private int hType; //链接类型:决定连接是在SDK中打开还是跳转到浏览器去
private Date startDate;
private Date endDate;
private Date updateTime;
private Date createTime;
private int status = 1;
get.set.......
} 有这样一个类, 用JSON.toJSONStringWithDateFormat(data,dateFormat,SerializerFeature.DisableCircularReferenceDetect);这个方法得到的字符里面 hType 这个字段丢失了, 是什么情况呢?
我也碰到同样的问题
private String businessScop;
private Date applicationDate;
private Integer pStatus;//内容不为空,丢失
private Date createDate;
private String creater;
private Date updateDate;
private String pName;//内容不为空,丢失
private String pUrl;//内容不为空,丢失
private Integer pLeaf;//内容不为空,丢失
1.1.41 貌似没丢。 是不是之前的版本有bug
getter/setter方法是怎样的?
这个bug应该已经修复,请使用最新版本