解析失败:com.alibaba.fastjson.JSONException: syntax error, expect {, actual string, p
fastjson
FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
项目地址:https://gitcode.com/gh_mirrors/fastj/fastjson

·
jsonString = jsonString.replace("\\", "").replace("\"{", "{").replace("}\"", "}");
什么情况?加了转义的\,导致解析失败了。这就是报错的原因。
把所有的 \ 替换为空,让后将 "{ 替换为 { 即可。




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