Library

Jsonifier v1.0.1

Versionv1.0.1
Stars★ 102
Released2026-08-13

A few classes for extremely fast json parsing/serializing in modern C++. Possibly the fastest json parser in C++. Possibly the fastest json serializer in C++.

Release notes

## Jsonifier v1.0.1 Release Notes

### 🏛️ Cathedral-Grade Rewrite: Structural Indices, Bool-Propagating Control Flow, and Full UTF-8 Validation

This release touches nearly every layer of the library — parsing, serialization, SIMD backends, containers, and error handling all got rebuilt around a few unifying architectural decisions. It's the largest single-release change set in the project's history.

---

### 🚀 Highlights

**Structural indices replace raw pointers throughout.** The structural index array (used by the parser, serializer, minifier, and prettifier alike) now stores `uint32_t` offsets into the source buffer instead of raw 8-byte pointers. This halves the structural index array's memory footprint and improves cache behavior across every major operation — parsing, minifying, prettifying, and serializing.

**Parsing, validation, minification, and prettification all now return `bool`.** Every core operation propagates failure immediately via `[[likely]]`/`[[unlikely]]`-guarded early returns instead of the old pattern of pushing errors to a side-channel and continuing to parse garbage. This is both a correctness improvement (no more wandering through a broken buffer after the first failure) and a performance one (failed parses bail immediately).

**Full UTF-8 validation, on by default.** A new Lemire/simdjson-derived UTF-8 validator ships with both a bulk `validateUtf8()` path and a streaming register-based validator that carries state across chunk boundaries — built for validating strings incrementally during parsing rather than requiring the whole buffer up front. `parse_options::validateUtf8` defaults to `true`. Backed by an extensive new test suite covering the full Markus Kuhn UTF-8 stress corpus, alignment-sweep fuzzing, and page-boundary overrun checks via `mmap`/`mprotect`.

**New SVE2 backend for ARM.** Jsonifier now has a full SIMD backend for ARM's SVE2 instruction set, covering both low-level primitives and the higher-level structural/whitespace/string stage1 detection layer. **⚠️ This backend is experimental and not yet fully correct** — a handful of parsing cases still misbehave under SVE2. Treat it as a preview; NEON remains the recommended path on ARM for production use until this shakes out.

**AVX-512 gating tightened.** AVX-512 codepaths now require F + BW + VBMI2 support to be detected together, rather than just F — a real safety fix for hardware that reports partial AVX-512 support.

**PCLMULQDQ detection added**, plumbed through CMake and the runtime CPU-feature detector as a new instruction-set flag (`JSONIFIER_CLMUL`).

---

### 🧠 Parser

- Object member dispatch got a tighter known-order fast path: for minified + known-key-order parsing, key matching now fuses comma + quote + key + quote + colon into a single compile-time literal match instead of checking each punctuation character separately.
- Vector parsing now parses into a reusable thread-local scratch buffer (reusing existing capacity where possible) and only moves the result into the caller's container once the full parse succeeds — avoids reallocation churn and ensures partial failures never leave the destination half-written.
- Tuple parsing unrolled via fold-expression-based `functor_runner` instead of deep recursive template instantiation — better compile times and codegen on larger tuples.
- The hash-map fallback path's anti-hash-state cache now only updates on a genuinely successful match, fixing a subtle bug where a failed parse could poison the cache for subsequent lookups.
- New `parse_options` fields: `maxDepth` (default 1024, guards against runaway/malicious nesting) and `nullTerminated`.
- The old fully-separate `parse_partial_impl` template hierarchy has been merged into the main `parse_impl` specializations, cutting a large amount of duplicated logic.

### ✍️ Serialization

- New branchless character-escaping via direct table lookup, replacing the old per-character switch statement.
-…

Share this resource


Discovered 2026-08-14 Source GitHub Archive 2026-08 →