I've been working on SJF4J , a unified JSON API for Java built around a simple idea: treat Java objects like JSON .
It combines runtime flexibility with compile-time performance across multiple backends, including Jackson 2.x / 3.x, Fastjson2, and Gson.
But can a unified API actually outperform the libraries underneath it?
Java JSON Binding Benchmarks
SJF4J provides a compiled binding API that generates backend-specific Java code through annotation processing, avoiding much of the overhead associated with generic runtime binding.
To explore its performance, I ran JMH benchmarks comparing SJF4J Compiled Binding with direct library binding and, for Jackson, Blackbird.
JVM — JDK 25
The JVM results show that compiled binding can match or outperform native library implementations across a range of workloads.
For example, in the 100KB Clients POJO deserialization benchmarks:
3.13× the performance of Jackson 2 Native
2.43× the performance of Gson Native
The improvements vary considerably by backend, data…