You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// fastjson 1.2.83
com.alibaba.fastjson.JSONException: field demo expect '[', but int, pos 19, line 1, column 20{"test":[{"demo": 1}]}
// fastjson 2.0.50
com.alibaba.fastjson2.JSONException: TODO, offset 19, character 1, line 1, column 19, fastjson-version 2.0.51 {"test":[{"demo": 1}]}
at com.alibaba.fastjson2.reader.ObjectReaderImplInt32Array.readObject(ObjectReaderImplInt32Array.java:87)
at com.alibaba.fastjson2.reader.ORG_2_1_Demo.readObject(Unknown Source)
at com.alibaba.fastjson2.reader.ORG_1_1_TestParam.readObject(Unknown Source)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:786)
at MutatedIssue464_432.test0(MutatedIssue464_432.java:14)
The text was updated successfully, but these errors were encountered:
问题描述
JSON.parseObject解析以下代码时,fastjson 1.2.83抛出对应的错误信息,而fastjson2 抛出JSONException: TODO。其中{"demo": 1}为illegal 字段,正确格式如:{"demo": [1]},可以完善一下exception信息。
环境信息
重现步骤
相关日志输出
// fastjson 1.2.83
com.alibaba.fastjson.JSONException: field demo expect '[', but int, pos 19, line 1, column 20{"test":[{"demo": 1}]}
// fastjson 2.0.50
com.alibaba.fastjson2.JSONException: TODO, offset 19, character 1, line 1, column 19, fastjson-version 2.0.51 {"test":[{"demo": 1}]}
at com.alibaba.fastjson2.reader.ObjectReaderImplInt32Array.readObject(ObjectReaderImplInt32Array.java:87)
at com.alibaba.fastjson2.reader.ORG_2_1_Demo.readObject(Unknown Source)
at com.alibaba.fastjson2.reader.ORG_1_1_TestParam.readObject(Unknown Source)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:786)
at MutatedIssue464_432.test0(MutatedIssue464_432.java:14)
The text was updated successfully, but these errors were encountered: