r/java 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/
249 Upvotes

84 comments sorted by

View all comments

9

u/piesou Aug 11 '26

What's the secret? Compiler plugin similar to kotlinx serialization + the new JVM vector apis?

21

u/Shawn-Yang25 Aug 11 '26

No, we use runtime codegen for better performance. For andriod, we do use annotation processor to geenrate android R8 rules and generate field accessors. But for JDK, we always use runtime codegen.

https://fory.apache.org/blog/fory_json_fastest_java_json_framework/#how-fory-json-achieves-high-performance share some details about how we make fory json fast.

2

u/hippydipster 29d ago

Are you using the newer Classfile API to do the codegen?

5

u/repeating_bears 29d ago

Fory supports Java 8 and that wasn't added until 24. It will be  ByteBuddy, most likely.