alibaba / fastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn
Apache License 2.0
25.76k stars 6.5k forks source link

2.0.38版本开始,反序列化时,当对象中的属性很多时,会报错not support,我本地大概80个左右 #4535

Open iwannayouhearme opened 1 month ago

iwannayouhearme commented 1 month ago

com.alibaba.fastjson.JSONException: not supported,测试了2.0.37一下版本可以,2.0.38,2.0.40,2.0.46,2.0.53都会报错

iwannayouhearme commented 1 month ago

测试方法:

 public static void main(String[] args) {
        String s1 = "{\"test\":\"1\"}";
        JSONObject.parseObject(s1, AppPkg.class);
    }

异常堆栈:

Exception in thread "main" com.alibaba.fastjson.JSONException: not supported
    at com.alibaba.fastjson.JSON.parseObject(JSON.java:520)
    at com.test.TestService.main(TestService.java:3449)
Caused by: com.alibaba.fastjson2.JSONException: not supported
    at com.alibaba.fastjson2.internal.asm.MethodWriter.visitJumpInsn(MethodWriter.java:285)
    at com.alibaba.fastjson2.reader.ObjectReaderCreatorASM.genMethodReadObject(ObjectReaderCreatorASM.java:1875)
    at com.alibaba.fastjson2.reader.ObjectReaderCreatorASM.jitObjectReader(ObjectReaderCreatorASM.java:578)
    at com.alibaba.fastjson2.reader.ObjectReaderCreatorASM.createObjectReader(ObjectReaderCreatorASM.java:344)
    at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReaderInternal(ObjectReaderProvider.java:1025)
    at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReader(ObjectReaderProvider.java:920)
    at com.alibaba.fastjson2.JSONReader.getObjectReader(JSONReader.java:480)
    at com.alibaba.fastjson.JSON.parseObject(JSON.java:509)
    ... 1 more