Fastjson Android design
Fastjson Android is designed with ASMDeserializerFactory
ASMDeserializerFactory is a Deserializer used to dynamically use ASM to generate JavaBeans. It is specially optimized for the characteristics of each class to obtain the fastest performance.
1. Limitations
Currently ASMDeserializerFactory cannot run on the dalvik virtual machine of Android and the lemur virtual machine of Alibaba Cloud OS.
Whether it supports | |
Support | |
Not supported | |
Not supported |
Currently ASMDeserializerFactory does not support JavaBeans with more than 200 fields. When doing deserialization, you need to define local variables to save the results of parse. The current asm framework cannot define more than 256 variables. The current conservative approach is that if the number of fields exceeds 200, ASMDeserializerFactory is not used.
DeserializeBeanInfo beanInfo = DeserializeBeanInfo.computeSetters(clazz, type); if (beanInfo.getFieldList().size() > 200) { asmEnable = false; }