Skip to content

ReerJSON 1.2.1

Latest

Choose a tag to compare

@vnixx vnixx released this 25 Sep 02:25

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_size read 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 plain yyjson_mut_obj_put fast 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 .custom key strategy
  • fix(encoder): reuse existing array in nestedUnkeyedContainer(forKey:)
  • fix(encoder): restore codingPath when a dictionary value throws
  • fix(value): escape strings and render numbers correctly in description

Performance

  • perf(decoder): drop redundant memchr scan in JSON.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 DocumentStorage and DocumentRef
  • Update README SwiftPM dependency example for 1.2.1

Verification

Full suite: 778 XCTest + 143 swift-testing tests, 0 failures, 0 skipped.