json串 转 list<class> 方法 List转JSONArray和JSONArray转List
1.List转JSONArray
List<T> list = new ArrayList<T>();
JSONArray array= JSONArray.parseArray(JSON.toJSONString(list));
2.JSONArray转List
JSONArray array = new JSONArray();
List<EventColAttr> list = JSONObject.parseArray(array.toJSONStri.
原创
2020-10-23 10:40:52 ·
576 阅读 ·
0 评论