chore(deps): update module github.com/buger/jsonparser to v1.6.1 - #718
Merged
renovate-sh-app[bot] merged 1 commit intoAug 6, 2026
Merged
Conversation
renovate-sh-app
Bot
requested review from
Ukochka,
oshirohugo and
toddtreece
and removed request for
a team
August 6, 2026 14:03
renovate-sh-app
Bot
deleted the
renovate/github.com-buger-jsonparser-1.x
branch
August 6, 2026 14:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.1.2→v1.6.1Release Notes
buger/jsonparser (github.com/buger/jsonparser)
v1.6.1Compare Source
Covered by ReqProof — L3 Assurance (123 requirements, 0 errors, 0 warnings)
Performance — gjson-style fast-skip in hot loops
Ported gjson's
>'\\'fast-skip trick to three inner loops in parser.go:stringEndConfigtail,blockEndConfig, andsearchKeysConfig. The trickuses a single unsigned comparison (
byte > 0x5C) to skip all non-structuralbytes in bulk, reducing per-byte branch overhead.
Zero allocations maintained on all paths.
Benchmarks — now includes gjson and sonic
Added tidwall/gjson (15.5k⭐, path-based
parser like jsonparser) and bytedance/sonic
(9.6k⭐, SIMD-accelerated deserializer) to the benchmark suite.
Final leaderboard (large payload):
jsonparser is the fastest across all payload sizes and the only zero-allocation parser.
v1.6.0Compare Source
Covered by ReqProof — L3 Assurance (123 requirements, 0 errors, 0 warnings)
New API —
AppendAppend(data, value, keys...)— appendsvalueto the end of the JSON array addressed bykeys. Addresses the top-level value whenkeysis empty; auto-vivifies a missing keyed path as a single-element array. ReturnsMalformedArrayErrorwhen the addressed value is not an array. Traced to SYS-REQ-009, SYS-REQ-110.Known issues — all resolved (zero open)
ParseInt("-")now returns an error instead of(0, nil). One-line sign-only guard inbytes.go:parseInt(after stripping the sign byte, an empty remainder returns(0, false, false)).Setwith an array-index path component under an object parent (and vice-versa) now auto-coerces the container type instead of emitting malformed JSON. (Disposition already set tofixedin v1.5.x.)Seton a top-level array-index beyond length now appends at the array's end (matching nested-array behavior under SYS-REQ-110) instead of returningKeyPathNotFoundError. Also cleans up trailing commas in malformed arrays.Zero open known issues. Every previously shipped known issue is now resolved and covered by ReqProof L3 Assurance.
v1.5.1Compare Source
Covered by ReqProof — L3 Assurance (123 requirements, 0 errors, 0 warnings)
Performance — 6.1x large-payload speedup
stringEndConfigwas scanning the ENTIRE remaining parent document for backslashes (bytes.IndexByte(data, '\\')) instead of just the string body. On a 24kb large payload this walked tens of KB per string. Now bounded todata[:firstQuote](the string body only). 128µs → 22µs (5.8x).bytes.IndexBytecalls (quote + backslash) with a single inline 8-byte SWAR (SIMD-Within-A-Register) loop that checks for both characters simultaneously. 22µs → 21µs (additional 8%).encoding/jsonbenchmark no longer uses ffjson-generated methods (the #126 ffjson measurement bug was fixed in v1.3.1).Updated benchmark results (Apple M4 Max, Go 1.26.3, median of 5 runs)
All jsonparser results: 0 bytes allocated, 0 allocations.
v1.5.0Compare Source
Covered by ReqProof — L3 Assurance
v1.5.0 extends the formal-verification coverage to 123 requirements (0 errors, 0 warnings) across all new APIs. Every new function is traced via source annotations, tested with MC/DC witnesses, and covered by the structure-aware fuzzer.
Config struct — opt-in lenient parsing (#160, #115)
AllowSingleQuotes— accept'key':'value'alongside"key":"value"(JavaScript/Python-style). The same escape rules apply inside single-quoted strings.AllowUnknownEscapes— pass through unknown escape sequences (\`,\x) literally instead of erroring.Get,GetString,Set,Delete,ArrayEach,ObjectEach.Streaming ReaderParser (#132, #257)
io.Reader— no need to load the entire document into memory.Get,GetString,ArrayEach.Name aliases (#66)
Canonical
EachXxxpattern added alongside existingXxxEachnames:EachArrayArrayEachEachObjectObjectEachEachArrayErrArrayEachErrEachArrayWildcardArrayEachWildcardEachKey,EachKeyErr,EachKeyWildcardalready matched the pattern. All old names remain functional.Proof
v1.4.0Compare Source
Covered by ReqProof — L3 Assurance
v1.4.0 adds 9 new backward-compatible APIs, each traced to a formal requirement and verified with MC/DC coverage. 121 requirements, 0 errors, 0 warnings.
New APIs
Iteration with error/break control — resolves #53, #129, #176, #230, #255, #262
ArrayEachErr— callback returnserrorto stop early (io.EOF= graceful stop)EachKeyErr— same pattern for EachKeySafe string handling — resolves #144, #158, #218, #270
Escape(s string) []byte— RFC 8259 string escaping (inverse ofUnescape)SetString(data, val, keys...)— Set with auto-quoted valueContainer accessors — resolves #175, #261, #271
GetArrayLen/GetObjectLen— count elements without a callbackGetUint64— uint64 variant ofGetIntDelete found signal — resolves #229
DeleteFound(data, keys...) ([]byte, bool)— returns whether the key was foundWildcard paths — resolves #112
EachKeyWildcard,ArrayEachWildcard,SetWildcard—[*]path componentJSONPath compiled paths — resolves #234, #251
ParsePath("$.users[0].name")→[]stringpathCompilePath+CompiledPath— pre-compile and reuse with Get/Set/DeleteFixes
Proof
v1.3.1Compare Source
Covered by ReqProof — L3 Assurance
v1.3.1 fixes 3 bugs that escaped the initial proof review, with new proof gates to prevent recurrence.
Bug fixes
SetandDeleteno longer corrupt the caller's input[]bytewhen the slice has spare capacity. All mutation paths now allocate a fresh buffer.EachKeynow descends into terminal array-index paths consistently withGet.Proof strengthening
no_input_mutation+assertInputUnchangedgateapi_consistency+ differential gatev1.3.0Compare Source
Formally verified by ReqProof
jsonparser v1.3.0 is the first Go library proven to L3 assurance by ReqProof, a git-native requirements-engineering and formal-verification platform. The entire codebase is now covered by:
encoding/jsondifferential harnesses.The proof review found and fixed 7 real bugs that years of community use, OSS-Fuzz, and standard fuzzing had missed. Read the root-cause analysis →
jsonparser serves as the reference case study for ReqProof — learn more at reqproof.com.
Security / bug fixes
Fix Delete panic on malformed input with leading comma (OSS-Fuzz
4649128)Deletepanicked withindex out of range [-1]on inputs like,{"test":1{}.The
data[prevTok]dereference is now guarded.Fix empty-string key-component panics (8 sites)
Get,GetString,GetInt,GetFloat,GetBoolean,GetUnsafeString,Set,Delete,EachKeypanicked withindex out of range [0]when a key path containedan empty string (
""). All 8 unguardedkeys[i][0]dereference sites are now guardedwith
len(...) > 0. Found by the structure-aware hazard sweep.Reported by @c-tonneslan (#284).
Fix Set data loss on scalar arrays (#267)
Seton an array-index path beyond the current length silently overwrote the arrayinstead of appending.
Set({"a":[1,2,3]}, 99, "a", "[9]")now returns{"a":[1,2,3,99]}instead of
{"a":[99]}. Reported by @Solaris-star (#286).Fix Set malformed-JSON output on cross-type paths
Setwith an array-index path component under an object parent (e.g.Set({}, 9, "[5]"))produced invalid JSON (
{[9]}). Set now auto-coerces the container type to match thepath, always producing valid JSON output.
Fix Delete trailing-comma malformation
Deleteleft a dangling trailing comma in the output when the deleted element wasfollowed by JSON whitespace (space/tab/LF/CR) and a comma. Found by the structure-aware
path-mutation fuzzer.
Fix ArrayEach spurious callback on non-array root
ArrayEachon a non-array root value (e.g.ArrayEach({"a":1}, cb)) invoked thecallback with a spurious element before returning an error. The callback is no longer
invoked; a clean error is returned immediately.
Fix lone-Unicode-surrogate mishandling in Unescape
ParseStringon a string containing a lone high surrogate (e.g.\uDB29without afollowing low surrogate) synthesized a bogus non-BMP code point from the following
literal bytes. Now substitutes U+FFFD (matching
encoding/jsonbehavior).Performance
parseInt fast-path for short numbers — 22–37% faster on typical 1–10 digit integers.
Numbers with ≤18 digits use direct int64 accumulation, bypassing the overflow-checked
uint64 slow path. Contributed by @trevorprater (#285).
stringEnd SIMD fast path — 12× faster on no-escape strings, 4.5× faster end-to-end
on
Getfor string values. Usesbytes.IndexBytefor the common case (no\beforethe closing
").Acknowledgments
4649128) — the original Delete leading-comma panicv1.2.0Compare Source
What's Changed
Full Changelog: buger/jsonparser@v1.1.2...v1.2.0
Configuration
📅 Schedule: (in timezone Europe/Berlin)
* 8-16 * * 1-4)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.