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

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

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

相关文章:

  • 2021-09-20
  • 2021-10-23
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-01-22
  • 2021-12-18
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案