https://blog.csdn.net/xiaofei__/article/details/89571320

 

(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.toJSONString(), EventColAttr.class); 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-10-30
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案