-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
数组解析错误 #1002
Comments
能提供更完整的错误堆栈信息么? |
|
JSONArray.of(list).toJSONString() 产生的字符串是这样的[[{........}]] 反序列化出这个错误 |
JSONArray.of方法和JDK9的List.of方法类似,of(list)传入的list是当元素处理。 新增加了一个方法:static JSONArray copyOf(Collection collection) public static JSONArray copyOf(Collection collection) {
return new JSONArray(collection);
} 请帮忙用2.0.22-SNAPSHOT版本验证,2.0.22版本预计在元旦期间发布 |
https://github.com/alibaba/Sentinel 项目改成2.0.20之后解析数组错误,1版不会出错
Caused by: com.alibaba.fastjson2.JSONException: expect {, but [, class com.alibaba.csp.sentinel.command.vo.NodeVo, offset 2, character [, line 1, column 3, fastjson-version 2.0.20 [[{"averageRt":0,"blockQps":0,"exceptionQps":0,"oneMinuteBlock":0,"oneMinuteException":0,"oneMinutePass":0,"oneMinuteTotal":0,"passQps":0,"resource":"pig-upms-biz","successQps":0,"threadNum":0,"timestamp":1670469398062,"totalQps":0},{"averageRt":0,"blockQps":0,"exceptionQps":0,"oneMinuteBlock":0,"oneMinuteException":0,"oneMinutePass":1,"oneMinuteTotal":1,"passQps":0,"resource":"pig-auth","successQps":0,"threadNum":0,"timestamp":1670469398062,"totalQps":0}]]
The text was updated successfully, but these errors were encountered: