'object' is an array. Use JSONArray instead

错误是:对象是一个数组,使用JSONArray代替

错误代码为:JSONObject json=JSONObject.fromObject(usertypeList);
 正确代码为:JSONArray json=JSONArray.fromObject(usertypeList); 

注意:JSONObject只是单个java对象转化json对象    

猜你喜欢

转载自www.cnblogs.com/bangandwolf/p/12435714.html