chaokunyang
Joined 3 years ago
Joined 3 years ago
In the published benchmarks, it reaches up to 10.91× Jackson’s throughput and 10.89× Gson’s in java-json-benchmark, and up to 5.55× and 10.00× respectively in the jvm-serializers MediaContent benchmark.
It supports JDK 8+, Android, and GraalVM Native Image. JDK17+ Record is also supported.
Feedback is welcome.
The main Java change is JDK 25 support without using sun.misc.Unsafe in the active runtime path. Older JDKs keep the existing fast path, while JDK 25+ uses replacement implementations based on supported JVM APIs.
Other notable changes:
- Java 9/16 module-info generation
- JDK 26+ final field deserialization support even when --illegal-final-field-mutation=deny
- compatible scalar field reads for schema evolution, e.g. int64 <-> String when the conversion is lossless
- generated gRPC service companions across Java, Rust, Go, Kotlin, Scala, C#, Python, and JavaScript/TypeScript - compatible-mode and row-format performance work
Feedback from people testing serialization libraries on newer JDKs or dealing with Unsafe removal would be useful.
namespace demo;
table Node {
parent: Node (fory_weak_ref: true);
children: [Node] (fory_ref: true);
cached: Node (fory_ref: true, fory_thread_safe_pointer: false);
}syntax = "proto3";
message TreeNode {
TreeNode parent = 1 [(fory).weak_ref = true];
repeated TreeNode children = 2 [(fory).ref = true];
}With fory first-class object graph serialziation support, you can serialize object graphs without manual *_id link reconstruction or rewriting your entire schema into Fory Schema.
1. GitHub: https://github.com/apache/fory
2. Compiler docs: https://fory.apache.org/docs/compiler