JSONArray 和 List 互转
JSONArray to List
JSONArray array = new JSONArray();
List<T> result = JSONObject.parseArray(array.toJSONString, T.class);
String to List
String str = "";
List<T> result = JSONObject.parseArray(str, T.class);
List to JSONArray
List list = new ArrayList<>();
JSONArray array = JSONObject.parseArray(JSON.toJSONString(list));