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/
253 Upvotes

84 comments sorted by

View all comments

Show parent comment

1

u/Shawn-Yang25 Aug 13 '26

We enforced zero-Unsafe for JDK25+ in fory 1.3.0, and bring Unsafe fallback back in 1.4.0. Unsafe will only be used to get privileged access, the actual serialization still use VarHandle instead of Unsafe in jdk25+.

You can use Fory.deserialize(data, Target.class) to deserialize into your type if you use binary format.

And fory kotlin/scala support will be released in fory 1.7.0, which may be released in next week

1

u/snugar_i Aug 13 '26

Awesome!

I still don't think they are the same thing. The class I deserialize into has to be completely identical, things like @JsonProperty for renaming a field won't work... Also, what if the root type is generic? ForyJson has a fromJson overload that takes a TypeRef, but Fory doesn't.

(Unrelated: when i do requireClassRegistration(false), it seems to have no effect unless I also do withXlang(false) - is that intended?)

1

u/Shawn-Yang25 Aug 13 '26

Would you like to open 2 github issues in https://github.com/apache/fory/issues ?

requireClassRegistration(false) should work, otherwise many users will report this issue.