fastjson icon indicating copy to clipboard operation
fastjson copied to clipboard

字段丢失

Open Skqing opened this issue 12 years ago • 4 comments

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 这个字段丢失了, 是什么情况呢?

Skqing avatar Mar 12 '14 10:03 Skqing

我也碰到同样的问题

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;//内容不为空,丢失

yl23250 avatar Jul 16 '14 04:07 yl23250

1.1.41 貌似没丢。 是不是之前的版本有bug

peiliping avatar Jul 16 '14 09:07 peiliping

getter/setter方法是怎样的?

wenshao avatar Oct 02 '14 16:10 wenshao

这个bug应该已经修复,请使用最新版本

wenshao avatar Oct 03 '14 10:10 wenshao