net json数据转换出现精度丢失问题

来源:互联网 发布:资料整理软件 编辑:程序博客网 时间:2024/06/05 19:35
String msg = "{\"v1\":1199638052864,\"v2\":1199638052864.999393939390}";net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(msg);System.out.println(json);com.alibaba.fastjson.JSONObject fastJson = com.alibaba.fastjson.JSONObject.parseObject(msg);System.out.println(fastJson);
{"v1":1199638052864,"v2":1.19963805E12}{"v1":1199638052864,"v2":1199638052864.999393939390}



阅读全文
0 0
原创粉丝点击