|
public static JSONArray getCount(JSONObject params, ActionContext context) throws SQLException, NamingException,Exception {
String array="[{FileUrl:118.126.117.131:86/Content/img/top.png,FileName:背景图片,CreateTime:2018-08-06}" +
",{FileUrl:118.126.117.131:86/Content/img/top.png,FileName:背景图片1,CreateTime:2018-08-06}]";
JSONArray aa=JSONArray.parseArray(array);
return aa;
}
编译报错
编译模块Java出错
E:\wex5\runtime\BaasServer\baas\fw\Fw__do.java:43: 错误: 不兼容的类型: JSONArray无法转换为JSONObject
JSONObject ret = class1.getCount(params, context);
我需要传递jsonArray,请问有什么办法? |
|