错误提示“com.alibaba.fastjson.JSONException: exepct '[', but string, pos 4, json”解决

错误提示“com.alibaba.fastjson.JSONException: exepct '[', but string, pos 4, json”解决

1、错误提示信息如下:

com.alibaba.fastjson.JSONException: exepct “[“, but string, pos 4, json : “[{“attrId”:33,”attrName”:”粗跟”},{“attrId”:44,”attrName”:”厚底”}]”

at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:672)

at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:662)

at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:657)

at com.alibaba.fastjson.JSON.parseArray(JSON.java:514)

2、原始代码:

List<AttributeServiceImpl.AttrValue> attrValues = JSON.parseArray(
s, AttributeServiceImpl.AttrValue.class);
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » 错误提示“com.alibaba.fastjson.JSONException: exepct '[', but string, pos 4, json”解决