Jsonifier is a set of classes for validating, serializing, parsing,
prettifying, and minifying objects into and out of JSON strings — very rapidly. It is
fully RFC8259 compliant, and is positioned as possibly the fastest
JSON parser and serializer in C++.
It achieves this through the combined use of SIMD instructions and
compile-time hash-maps for the keys of the data being parsed —
so key lookup stays O(1) and order-independent rather than degrading on out-of-sequence documents.
Registered on the Microsoft vcpkg registry.
Why
Most fast JSON libraries are fast on the happy path and fragile everywhere else. Jsonifier is
built to be fast and unbreakable. The serializer leans on compile-time reflection over
your types, the parser resolves keys through a perfect hash computed at compile time, and the
SIMD layer dispatches to the widest instruction set your CPU supports.
Jsonifier doesn't just parse JSON — it survives it. Every build is hardened against malformed
input by a fuzz-simulation test that corrupts a 2000-plus-character JSON string one byte at a
time, generating thousands of progressively invalid permutations and force-feeding each through
both parsing and schema validation. Zero crashes, zero memory violations,
zero undefined behavior — under both AddressSanitizer and UndefinedBehaviorSanitizer,
across the full Windows / Linux / macOS matrix, on every push.
Features
Fully RFC8259-compliant parsing and serialization
Parse, serialize, validate, prettify, and minify — one library
Every push triggers the full test suite across Windows MSVC, Ubuntu
GCC, Ubuntu Clang, macOS Clang, and macOS GCC — with both
AddressSanitizer and
UndefinedBehaviorSanitizer live.
Conformance
30+ RFC8259 conformance tests from the official JSON test suite — pass and fail cases both.
Round-Trip
27 serialize → parse → compare tests covering nulls, empties, large numbers, special floats.
Throughput is measured in megabytes processed per second (MB/s) for
both reading (parse) and writing (serialize), benchmarked against
Glaze and simdjson on identical
hardware.
The harness uses adaptive epoch sampling: iterations begin at
60 and double each epoch (60 → 120 → 240 → …) up to a maximum of 1,200 iterations per epoch.
Each epoch evaluates a trailing window of max(iterations / 10, 10) samples, capped
at 100,000. Convergence requires RSE < 2.5% AND
mean shift < 1% epoch-over-epoch simultaneously — the
first epoch satisfying both conditions is retained as the canonical result.
If convergence is never reached before 5 seconds elapse or
the iteration cap is hit, the result is marked non-converged
and excluded from all rankings — only converged results participate in win/tie/loss tallying.
Statistical ties are detected via Welch's t-test on
Bessel-corrected variance, so a small delta inside the noise
floor doesn't get dressed up as a victory.
The output of each call is consumed through do_not_optimize_away()
so the compiler can't eliminate the work, and input data is regenerated per iteration to prevent
branch predictors and data caches from learning the input distribution.