We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用方式: com.alibaba.fastjson2.JSON#parseObject(java.lang.String, java.lang.Class)
过程: fastjson2在反序列化时默认使用ObjectReaderCreatorASM创建ObjectReader,在ObjectReaderCreatorASM执行创建的过程中,有个match机制,默认情况下会是false,这样的话,从父类创建ObjectReader,最终使用的是Method.invoke的方式绑定字段。
com.alibaba.fastjson2.reader.ObjectReaderCreatorASM#createObjectReader for (FieldReader fieldReader : fieldReaderArray) { if (fieldReader.getMethod() != null) { match = false; break; } if (fieldReader instanceof FieldReaderReadOnly || fieldReader.isUnwrapped() ) { match = false; break; } } ... if (!match) { return super.createObjectReader(objectClass, objectType, fieldBased, modules); }
虽然最终可以正常的反序列化,并绑定对象,请问这是正常逻辑吗?这个过程中的核心逻辑并未用到ASM的机制?
请填写以下信息:
使用ASM机制动态生成ObjectReader子类,进行反序列化
The text was updated successfully, but these errors were encountered:
这个问题是中间改错了,已经修复了,预计在周末发布的2.0.5版本中修复。
Sorry, something went wrong.
https://github.com/alibaba/fastjson2/releases/tag/2.0.5 问题已修复,请用新版本
No branches or pull requests
问题描述
使用方式:
com.alibaba.fastjson2.JSON#parseObject(java.lang.String, java.lang.Class)
过程:
fastjson2在反序列化时默认使用ObjectReaderCreatorASM创建ObjectReader,在ObjectReaderCreatorASM执行创建的过程中,有个match机制,默认情况下会是false,这样的话,从父类创建ObjectReader,最终使用的是Method.invoke的方式绑定字段。
虽然最终可以正常的反序列化,并绑定对象,请问这是正常逻辑吗?这个过程中的核心逻辑并未用到ASM的机制?
环境信息
请填写以下信息:
重现步骤
期待的正确结果
使用ASM机制动态生成ObjectReader子类,进行反序列化
The text was updated successfully, but these errors were encountered: