A hyper-optimized, zero-allocation, reflection-free JSON parser and serializer built for the modern JVM (JDK 26+).
This engine was designed from the ground up to achieve maximum throughput and minimal garbage collection pressure, outperforming industry standards like Jackson in direct JMH benchmarks—without a single external dependency.
- Blazing Fast (JMH Proven): Consistently beats Jackson Databind in throughput and offers significantly lower jitter/variance under load.
- Zero Dependencies: 100% pure Vanilla Java. No
jackson, nogson, noorg.json. - Zero-Allocation Hot-Path: Utilizes advanced object pooling, custom cached byte arrays, and direct
byte[]buffer pushing. The Garbage Collector rests while you parse millions of records. - Project Loom / Virtual Thread Ready: Completely free of blocking locks or
synchronizedbottlenecks in the hot-path. Uses elastic soft-limit object pools instead of memory-heavyThreadLocalstructures. - Modern JDK Architecture: Leverages Pattern Matching, Records, Sealed Interfaces, and
LambdaMetafactoryinstead of slow, traditional Reflection. - Hybrid Stack Architecture: Exploits fast native JVM call stacks for typical JSON depth, while falling back to a safe, heap-based state machine for infinite-depth protection.
Add the library to your project. (Note: Requires JDK 26 or higher)
Maven:
Add the JitPack repository to your pom.xml:
jitpack.io
https://jitpack.io
Then add the dependency: com.github.SkateScout suche.org-json v1.0.0
Gradle: repositories { mavenCentral() maven { url 'https://jitpack.io' } }
dependencies { implementation 'com.github.SkateScout:suche.org-json:v1.0.0' }
Tested against com.fasterxml.jackson.core:jackson-databind.
Benchmarks use the hybrid recursion approach (maxRecursion=128) on JDK 26.
(Throughput in operations per second. Higher is better.)
| Dataset | Jackson (ops/s) | Suche Engine (ops/s) | Result |
|---|---|---|---|
| Canada (GeoJSON) | 38,624 | 56,342 | + 45% Faster 🚀 |
| Twitter (Web API) | 473,346 | 520,496 | + 10% Faster 🚀 |
| Citm Catalog | 234,858 | 231,188 | ~ Equal |
| Dataset | Jackson (ops/s) | Suche Engine (ops/s) | Result |
|---|---|---|---|
| Canada (GeoJSON) | 58,893 | 120,305 | + 104% Faster 🚀 |
| Citm Catalog | 412,337 | 475,716 | + 15% Faster 🚀 |
| Twitter (Web API) | 935,974 | 793,936 | - 15% |
import org.suche.json.JsonEngine; import org.suche.json.MetaConfig;
public static final JsonEngine ENGINE = JsonEngine.of(MetaConfig.DEFAULT);
try (var stream = ENGINE.jsonOutputStream(outputStream)) { stream.writeObject(myObject); }
try (var stream = ENGINE.jsonInputStream(inputStream)) { TargetClass parsed = stream.readObject(TargetClass.class); }
- Fractional Truncation & Bitmasking: Bypasses
Double.parseDouble()and branch-heavyStringoperations completely in the hot-path. - FastKeyTable: Property resolution relies on bit-masked custom hash tables instead of standard HashMaps, eliminating
Map.Entryallocations. - Fail-Fast Reflection: Operations on final fields are handled cleanly without reflective mutation hacks, ensuring compatibility with Jigsaw modules.
- The Static Cache Trap Avoided: Caches are bound to the
JsonEngineinstance, preventing Metaspace memory leaks during hot-reloads in application servers.
This project is licensed under the MIT License.