Jsonifier v1.0.0
Release date: June 15, 2026
The first stable release of Jsonifier, a header-only C++ library for high-performance, fully RFC 8259-compliant JSON parsing, validation, and serialization. This release establishes the complete public API, the SIMD-accelerated core that powers it, and the build, packaging, and test infrastructure around it.
Highlights
- Header-only. Drop
Include/jsonifierinto your project and#include <jsonifier/Index.hpp>— no build step, no linking. - SIMD-accelerated throughout. Parsing, validation, minifying, prettifying, and string comparison are all vectorized, with runtime/compile-time dispatch across AVX-512, AVX2, AVX, and ARM NEON, plus BMI, LZCNT, and POPCNT bit-manipulation paths. A scalar fallback covers everything else. CPU features are auto-detected at configure time.
- Cross-platform. Supported on Windows, Linux, and macOS, on both x86-64 and ARM64, across MSVC, GCC, and Clang.
- Reflection-based mapping. Serialize and parse user types directly without hand-written glue code.
- RFC 8259 compliant, verified against a conformance suite plus round-trip, float/integer/string, and bounds-truncation tests.
Core capabilities
- Parsing —
Parserwith a SIMD parsing core and structural validation. Includes aknownOrderoption that bypasses hash-map key lookup when JSON keys arrive in declaration order, backed by per-type adaptiveantiHashStatesthat learn the observed key order to preserve the fast path across repeated parses (see below). - Validation — standalone
Validatorfor checking JSON conformance independent of parsing. - Serialization —
Serializerfor turning C++ types into JSON. - Minifying & prettifying —
MinifierandPrettifierfor compacting or formatting JSON. - Raw JSON access —
jsonifier::raw_json_datafor working with untyped/dynamic documents.
Parse-order optimizations
knownOrderoption. An opt-in fast path (parse_options::knownOrder) for objects whose keys arrive in the same order as the type's declared members. When enabled, the parser matches the next expected key with a compile-time string comparison plus a colon check instead of consulting the hash map. On a hit it parses the member and returns immediately; on a miss it falls back to the normal hashed lookup. Excluded keys are still honored on the fast path.- Adaptive
antiHashStates. Athread_local, per-type array (sized to the member count, initialized to the identity mapping) that makesknownOrderrobust against documents that only mostly follow declaration order. When the in-order shortcut misses, dispatch routes through the adaptive index, and every successful hashed lookup writes the resolved index back. The "expected next member" therefore adapts to the order actually observed, keeping repeated parses of similarly-ordered documents on the fast path even when the order isn't a perfect match to the struct.
Utilities included
A full supporting toolkit ships alongside the JSON core: a custom allocator, Array, Tuple, and iterator containers, a SIMD-aware hash map and string hashing, an owned String / StringView, compile-time string literals, fast number conversion (StrToD, StrToI, IToStr, DToStr, plus a fast-float path), SIMD-backed comparison, compile-time reflection, and a structured error-reporting type.
Additional parse options
Beyond knownOrder, the parse_options struct exposes partialRead (parse only the fields registered on the type, tolerating extra or unordered keys), minified (skip whitespace handling for known-minified input), and validateJson (validate while parsing). Serialization has a matching serialize_options with a prettify flag.
Build, install, and packaging
- CMake (3.18+) interface target
Jsonifier::Jsonifier, consumable viafind_package,FetchContent, or vcpkg. Architecture detection compiles a small probe to set the right SIMD flags and generatesJsonifierCPUInstructions.hpp; flags can be overridden manually. - Sanitizers.
JSONIFIER_ASANandJSONIFIER_UBSANbuild options, with platform/compiler guards (e.g. ignored where unsupported, such as ASan/UBSan under GCC on macOS). - vcpkg port with an automated PHP-based release pipeline for computing the source hash and publishing version updates.
- Presets for Windows covering Release/Debug, benchmarks, tests, and sanitizer configurations.
Testing
A unit-test suite (built with -DJSONIFIER_UNIT_TESTS=ON) runs on every push across all supported OS/compiler combinations with ASan and UBSan enabled. Coverage includes a 30+ file RFC 8259 conformance suite, 27 round-trip tests, float and integer edge cases (denormals, infinities, overflow boundaries), Unicode/emoji and escape-sequence strings, truncation/bounds handling, and broad type coverage (vectors, arrays, maps, tuples, optional, shared_ptr, enums, and nested structures).
Requirements
- CMake 3.18 or later.
- A C++23-capable compiler: MSVC 2022+, GCC 11+, or Clang 14+ (the library makes heavy use of concepts,
consteval, andstd::bit_cast). - x86-64 or ARM64 (with NEON) on Windows, Linux, or macOS.
License
MIT. Copyright © RealTimeChris. Source: https://github.com/RealTimeChris/jsonifier