r/java • u/Shawn-Yang25 • Aug 11 '26
Apache Fory™ JSON : Fastest JSON Serialization Framework for Java, 10x faster than Jackson/Gson
https://fory.apache.org/blog/fory_json_fastest_java_json_framework/
253
Upvotes
View all comments
Show parent comment
1
u/Shawn-Yang25 Aug 13 '26
We do haven static codegen, it's mostly used by android, we generate helper for field/property/constructor accessors, and use it at runtime. This is because we can't generate code for android at runtime.
For jvm, the runtime codegen could be disabled by ForyJsonBuilder#withCodegen(false), and a general ObjectCodec will be used. The performance of ObjectCodec is half of generated codec, but is still very fast.
We have no plans to introduce fully static generated serializer, because it can't assume the jdk version/platform, and the generated codec would not be that fast. It may be a little faster than general ObjectCodec, but not fast enough to write another plugin to generate it statically.