Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 2.96 KB

1.8.0.md

File metadata and controls

54 lines (44 loc) · 2.96 KB

Swift-JSON 1.8.0 — release notes

This minor release adds located root-array streaming to JSONStreaming. Preparation and tagging do not establish publication; the official GitHub release and its qualification asset identify the final source and actual outcomes.

Added

JSONLocatedTopLevelArraySequence reads one root array like JSONTopLevelArraySequence and yields JSONLocatedTopLevelArrayEvent values: element(index:value:sourceSpan:) for each element, then one documentCompleted(_:) summary. The JSONSourceSpan contains zero-based, half-open UTF-8 byte offsets in the complete stream. It covers the element token or subtree only; surrounding whitespace and separators are excluded. Offsets count encoded bytes, not characters or decoded scalars, and do not depend on how the caller's source splits chunks.

Spans are provisional until documentCompleted, exactly like the elements. The reader retains no original bytes, starts no prefetch task and owns no file. A consumer that needs a record's raw slice retains an immutable source separately and applies the span to it. This lets applications that stage large exports record each element's original location without a private fork of the package.

Both root-array facades use one internal driver. Strict grammar, per-element and iterator-lifetime quotas, JSONFailure values, statistics, cancellation and the completion boundary are therefore identical. JSONTopLevelArraySequence keeps its public API and observable behavior.

The feature was integrated through PR #78. Public-consumer tests cover exact spans at every two-chunk split and with one-byte chunks, nested containers, multi-byte UTF-8 and escapes, empty arrays, parity with the value-only reader on valid and malformed inputs, and identical limit failures.

Compatibility and qualification

The change is additive. No product, runtime dependency, platform or deployment floor changes. The package keeps twelve library products plus swift-json, thirteen DocC catalogs, Swift tools and compiler 6.4+, Swift language mode 6, Apple OS/SDK 27+, an empty root dependency graph, Apache-2.0 and retained upstream notices. CLI metadata reports 1.8.0 with the deterministic final-source identity.

The roadmap's previously proposed 1.8 scope, bounded structural workflows, moves to 1.9.0; durable workflows move to 1.10.0. Both remain proposed scope, not API approval.

The release qualification asset records actual source-bound Native, Linux, safety, docs and archive outcomes. Navigation G4 remains HOLD with zero accepted controlled timing samples. Transform's scoped performance disposition and incomplete historical sampling windows are preserved, without a new measured pass. The historical approximately 11% streaming regression disposition and unchanged 10% review trigger remain. This release makes no speed, throughput, allocation or RSS claim. Logical retained bytes and caller work retain their documented accounting boundaries.