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

1、报错代码:

{ "code":500,"mes":"System.NullReferenceException: 未将对象引用设置到对象的实例。
   在xxxxxx.CreatePart(String strJson) 位置 D:\Extech\xxxx\xxx\xxx\xxxxxxxx.cs:行号 475!","message":"未将对象引用设置到对象的实例。!"}
JSONObject returnJsonObject = JSONObject.parseObject(exResult);

  报错原因:该字符串有转移字符串。

解决办法:把转移字符串去掉就可以了

exResult = exResult.replace("\\", "");
                            JSONObject returnJsonObject = JSONObject.parseObject(exResult);

  

posted @ 2024-06-17 13:58  信铁寒胜  阅读(9)  评论(0编辑  收藏  举报