Repository navigation
ReerJSON 1.2.1
Bug-fix release. Supersedes 1.2.0, which introduced a ~22% encoder regression.
Fixes
- perf(encoder): keep narrow keyed containers off the width check — 1.2.0 routed every keyed-container insert through a width check, costing a
yyjson_mut_obj_sizeread per insert on the common narrow-object path. Re-encoding Twitter regressed from 0.70 ms to 0.87 ms. Narrow objects now stay on the plainyyjson_mut_obj_putfast path. Back to 0.706/0.707/0.708 ms over three alternating rounds. - fix(decoder): reject integer literals that overflow 64 bits
- fix(encoder): pass the container's full coding path to
.customkey strategy - fix(encoder): reuse existing array in
nestedUnkeyedContainer(forKey:) - fix(encoder): restore
codingPathwhen a dictionary value throws - fix(value): escape strings and render numbers correctly in
description
Performance
- perf(decoder): drop redundant
memchrscan inJSON.string - perf(decoder): byte-level fast path for
convertFromSnakeCase - perf(decoder): parse plain integer literals without
yyjson_read_number - perf(stream): bound per-item parse window to fix O(K²) streaming
- perf(serialization): single-pass, cast-free Foundation → yyjson writer
Other
- refactor(value): share document parsing between
DocumentStorageandDocumentRef - Update README SwiftPM dependency example for 1.2.1
Verification
Full suite: 778 XCTest + 143 swift-testing tests, 0 failures, 0 skipped.