net.sf.json.JSONException: 'object' is an array. Use JSONArray instead
2020-11-18 16:51
标签:java jsonconfig fromobject json object list集合转换JSON出错误 意思是:对象”是一个数组。使用jsonarray代替。 解决方法: 将JSONObject替换为JSONArray 代码: JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT); JSONArray json = JSONArray.fromObject(newList, jsonConfig); result = json.toString(); net.sf.json.JSONException: 'object' is an array. Use JSONArray instead 标签:java jsonconfig fromobject json object 原文地址:http://blog.csdn.net/testcs_dn/article/details/24695267
文章标题:net.sf.json.JSONException: 'object' is an array. Use JSONArray instead
文章链接:http://soscw.com/index.php/essay/21883.html