首页 > 其他分享 >JSONArray与List集合之间的相互转换

JSONArray与List集合之间的相互转换

时间:2023-02-27 09:34:45浏览次数:41  
标签:fastjson JSONArray List list parseArray json 集合

1.List转fastjson JSONArray

List list = new ArrayList();

JSONArray jsonArray = JSONArray.parseArray(JSONArray.toString());

 

2.fastjson JSONArray转List

JSONArray json = new JSOArray();

List<T> list = JSONArray.parseArray(json.toString(),T.class);

标签:fastjson,JSONArray,List,list,parseArray,json,集合
From: https://www.cnblogs.com/802syy/p/17158576.html

相关文章