com.alibaba.fastjson.JSONArray cannot be cast to com.alibaba.fastjson.JSONObject
json中类型转换问题:
[{}]是错误的格式
错误写法:
JSONObject.parseObject("[{\"type\":\"table\",\"show\":\"true\",\"start\":1,\"end\":20}]");
正确写法:
JSONObject.parseObject("{\"type\":\"table\",\"show\":\"true\",\"start\":1,\"end\":20}");
网友评论