syntax error, expect {, actual string, pos 1, fastjson-version 1.2.68
fastjson
FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
项目地址:https://gitcode.com/gh_mirrors/fastj/fastjson

·
背景
获取此错误的原因,我这边的错误是从redis 获取 集合数据,解析错误,以前没有出现过此种错误。突然出现。为了保证数据ok
做了兼容,兼容代码如下;
try {
// 从redis 获取配置数据
Object cnObject = redisUtil.get("cn");
if (cnAddress == null) {
// 调用方法返回集合
List<AddressDTO> Info = getInfo(integer);
redisUtil.set("cn", Info );
return Info
} else {
List<AddressDTO> list = JSON.parseArray( JSON.toJSONString(cnObject), AddressDTO.class);
return list ;
}
}catch (Exception e){
// 调用方法返回集合
List<AddressDTO> Info = getInfo(integer);
redisUtil.set("cn", Info );
return Info
}




FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
最近提交(Master分支:17 天前 )
c942c834 - 2 年前
5bc4709b - 2 年前
更多推荐
所有评论(0)