fastjson 测试报错

gmol1639  于 2021-11-27  发布在  Java
关注(0)|答案(0)|浏览(256)

版本:1.2.51
测试字符串:{"undefined":"","abaaaa":"aaaa\s\d+\bbbbbb.+ccc.+ccc","vvvvvv":"#aaaaa bbbb ccc","eeeee":"11111"}
代码:

public class Test {
public static void main(String[] args) {
String str = "{"undefined":"","abaaaa":"aaaa\s\d+\bbbbbb.+ccc.+ccc","vvvvvv":"#aaaaa bbbb ccc","eeeee":"11111"}";
JSONObject jsonObject = JSONObject.parseObject(str);
System.out.println(jsonObject);
}
}

全部报错信息:
Exception in thread "main" com.alibaba.fastjson.JSONException: unclosed string : s
at com.alibaba.fastjson.parser.JSONLexerBase.scanString(JSONLexerBase.java:989)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:469)
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1367)
at com.alibaba.fastjson.parser.DefaultJSONParser.parse(DefaultJSONParser.java:1333)
at com.alibaba.fastjson.JSON.parse(JSON.java:155)
at com.alibaba.fastjson.JSON.parse(JSON.java:165)
at com.alibaba.fastjson.JSON.parse(JSON.java:134)
at com.alibaba.fastjson.JSON.parseObject(JSON.java:226)
at Test.main(Test.java:13)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题