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
java.lang.ClassCastException: class com.alibaba.fastjson.JSONObject cannot be cast to class com.alibaba.fastjson2.JSONObject (com.alibaba.fastjson.JSONObject and com.alibaba.fastjson2.JSONObject are in unnamed module of loader 'app')
at com.alibaba.fastjson2.reader.ObjectReaderImplList.createInstance(ObjectReaderImplList.java:302)
at com.alibaba.fastjson2.reader.ObjectReader.createInstance(ObjectReader.java:37)
at com.alibaba.fastjson.JSONArray.toJavaObject(JSONArray.java:877)
at com.test.TestMain.testMap(TestUrl.java:165)
at com.test.TestMain.main(TestUrl.java:115)
附加信息
The text was updated successfully, but these errors were encountered:
问题描述
使用FastJson1.x的api出现2.x的转型失败异常。
环境信息
重现步骤
如何操作可以重现该问题:
期待的正确结果
能正常输出List信息,不再抛出转型异常
相关日志输出
java.lang.ClassCastException: class com.alibaba.fastjson.JSONObject cannot be cast to class com.alibaba.fastjson2.JSONObject (com.alibaba.fastjson.JSONObject and com.alibaba.fastjson2.JSONObject are in unnamed module of loader 'app')
at com.alibaba.fastjson2.reader.ObjectReaderImplList.createInstance(ObjectReaderImplList.java:302)
at com.alibaba.fastjson2.reader.ObjectReader.createInstance(ObjectReader.java:37)
at com.alibaba.fastjson.JSONArray.toJavaObject(JSONArray.java:877)
at com.test.TestMain.testMap(TestUrl.java:165)
at com.test.TestMain.main(TestUrl.java:115)
附加信息
The text was updated successfully, but these errors were encountered: