com.alibaba.fastjson.JSONException

在这里插入图片描述
转换的工具类我是使用的阿里的com.alibaba.fastjson.JSONArray;

操作如下:

List list =JSONArray.parseArray(XXX.get(“json”).toString().trim(), XXX.class);

在这一步时,json转list报了错,

:com.alibaba.fastjson.JSONException: unclosed string : w

原因是前端传过来的json数据有问题,没有通过校验,通过直接翻译可以看出

unclosed string(未闭合的字符串)
原因是:

当前json字符串有误,没有正常拼接

猜你喜欢

转载自blog.csdn.net/weixin_42595331/article/details/85158977