大家好,又见面了,我是你们的朋友全栈君。1.fastjson List转JSONArray List<T> list = new ArrayList<T>(); JSONArray array= JSONArray.parseArray(JSON.toJSONString(list));
2.fastjson JSONArray转List JSONArray array = new JSONArray(); List<EventColAttr> list = JSONObject.parseArray(array.toJSONString(), EventColAttr.class);
3.fastjson 字符串转List String str = “”; List<T> list = JSONObject.parseArray(str,T.class);
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/147720.html原文链接:https://javaforall.cn