GJSON
Compiled JSON paths with typed results
Current release —
v1.0.3.goforge.dev/gpgjsonis at 100% feature parity withtidwall/gjsonv1.19.0 (45/45 declarations and 1,301/1,301 pinned path cases, differential + fuzz tested), race/vet clean and consumes Go+ stdlib v0.207.0. Install withgo get goforge.dev/gpgjson@v1.0.3.
GoForge GJSON targets tidwall/gjson v1.19.0. It combines a compatibility
facade with compiled paths, validated indexed documents, exhaustive
missing/null/value/malformed outcomes, lossless integers, and explicit
owned/borrowed lifetimes.
Current parity
All 45 inventoried declarations are implemented. Differential coverage now
includes ordinary result collections, recursive values, iterators, ordering,
path reconstruction, JSON-string escaping, JSON-lines traversal, wildcards,
projections, query operators, multipaths, pipes, static literals, permissive
parsing, legacy custom modifiers, and every pinned built-in modifier. The
reproducible extractor records 1,301 distinct path-bearing calls from 94
deterministic upstream tests. Every public Result field matches on all 1,301
cases, and the checked-in gap manifest is empty. A deterministic grammar
matrix crosses 316 selectors, continuations,
pipes, and malformed delimiters. The latest 10-second differential fuzz gate
loaded 2,042 local corpus/cache inputs and completed 5.41 million additional
executions, finding escaped-operator and wildcard-query edge cases.
Go+ and standard library
The scanner, path compiler, immutable document, modifiers, compatibility
surface, JSON/CBOR bridges, schema layer, and typed API are authored in ten
.gp files. Checked *_gp.go files are reproducibly generated rather than
maintained as a second handwritten implementation.
Schema-indexed paths and documents exercise std/result and std/option.
This work also forced std/pathquery, an immutable UTF-8-aware wildcard
matcher shared by dynamic document evaluators. Its relation algebra centralizes
equality/order duality, complements, and wildcard predicates while leaving
format-specific parsing and coercion outside std. Matching performs without
allocations.
Performance
Schema-typed checked lookup is conservatively 2.31× faster with 100%
fewer allocations. Ordinary compiled borrowed lookup is 2.66× faster.
The new std/pathquery matcher is conservatively 9.76× faster than the
replaced dynamic-programming matcher with 100% fewer allocations. Complete
dynamic compatibility paths still need equivalent paired end-to-end evidence.
Current one-shot wildcard, query, and projection measurements are slower than
upstream, so they remain release-blocking optimization work. A new streaming
ordinary-path fast path has nevertheless removed all 24 former wildcard
allocations and improved latency from roughly 995 ns to 112 ns; query
allocations fell from 57 to zero and latency from roughly 2,034 ns to 460 ns.
Projection fell from 55 allocations and
1,657 bytes to two allocations, 112 bytes, and about 393 ns while retaining
exact path provenance.
Release gate
All 45 declarations and the complete path corpus must pass, compatibility entry points must preserve upstream behavior, matching Go+/stdlib versions must be released, and a clean consumer must resolve the vanity module after the release repository is pulled and tagged.