I was wondering if FastJson use reflection in its implementation ?
I am considering between FastJson and Kotlinx Serializer for my project, since I know that Kotlinx Serializer doesn't use reflection in its implementation therefore it doesn't suffer from reflection performance overhead https://blog.frankel.ch/performance-cost-of-reflection/.
3条答案
按热度按时间xsuvu9jc1#
In filedBase mode, only reflection will be used.
ewm0tg9j2#
By default, fastjson uses ASM(a technique that dynamically generates/modifies .class bytecode files directly) instead of reflection, which can be toggled by using the annotation
@JSONType(asm = true/false)
.xam8gpfp3#
ASM default,and Reflection optional.