'object' is an array. Use JSONArray instead

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

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

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

原文地址:https://www.cnblogs.com/sllcom/p/7859731.html