![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JSON
洪韭菜
扶我起来,我还能继续努力
展开
-
fastjson教程 List转JSONArray以及JSONArray转List
1.fastjson List转JSONArrayList<T> list = new ArrayList<T>();JSONArray array= JSONArray.parseArray(JSON.toJSONString(list));2.fastjson JSONArray转ListJSONArray array = new JSONArray();List<T> list = JSONObject.parseArray(array.toJSONSt..原创 2020-11-05 15:14:51 · 470 阅读 · 0 评论 -
解决 fastjson toJSON方法日期类型字段 由时间戳转换成自定义类型格式的问题 JSON.toJSONStringWithDateFormat
将map集合转为json对象时遇到一个问题。map中 updateTime的value为日期格式如"2001-01-01",在使用JSONObject.toJSON(map).toString()的时候, 得到的结果 updateTime 的值为 时间戳解决方法:使用fastjson 的JSON.toJSONStringWithDateFormat(Object,...原创 2020-03-29 12:49:21 · 5684 阅读 · 0 评论