JSON中toJSONString、parseObject、parseArray的作用
时间:2019-02-19 11:28:18
收藏:0
阅读:1588
1、toJSONString
String str = JSON.toJSONString(Entity);
2、parseObject
Entity toObj = JSON.parseObject(str, Entity.class);
3、parseArray
String arrJson = JSON.toJSONString(entityList); List<Entity> arrList = JSON.parseArray(arrJson, Entity.class);
原文:https://www.cnblogs.com/lyx-2018-yh-qingliu/p/10399869.html
评论(0)