Skip to content

Swift-JSON 1.3.0 — JSONHTML and prepared exports

Choose a tag to compare

@ThorFuchs ThorFuchs released this 14 Oct 21:44
9517233

Swift-JSON 1.3.0 adds JSONHTML: exact standalone HTML, offline inspection and immutable prepared exports. The existing JSON, JSONSchema, JSONStreaming and JSONPatch products retain their contracts. The root package dependency graph remains empty; JSONRegexRuntime stays private.

What's new

  • Formatted HTML: complete, highlighted, script-free output from the shared strict writer. Exact decimal spellings, decoded Unicode scalar identity, insertion order and array order survive rendering.
  • Offline exploration: opt-in native disclosures, bounded outline and literal search, exact JSON/Pointer copy and download, embedded CSP-authorized assets, and full-content printing independent of disclosure state. No browser numeric reconstruction or network resolver is introduced.
  • Typed diagnostics: attach caller diagnostics by exact typed path, identify missing targets at the nearest existing parent, and display coherent JSONDocument byte spans. Replaced roots invent no locations; rendering never asserts schema validity.
  • Prepared export: immutable JSON, UTF-8 text, Markdown with actual tab indentation, expanded static HTML and opt-in styled RTF. One finite cumulative native preparation budget covers admission, helpers and final artifacts. Explicit format selection controls what an item offers.
  • Apple transfer: importing JSONHTML adds JSON's CoreTransferable conformance. Native JSON imports through the strict bounded parser; presentation formats are export-only. Transfer closures offer completed bytes and never start a PDF render or mutate a shared cache.
  • Explicit Apple PDF: asynchronous main-actor preparation from the item's own static HTML, genuine A4/US Letter pagination and an explicit continuous mode. Finite page/byte/bundle allowances, cancellation, soft deadlines, invocation-owned lifecycle and late-result rejection preserve immutable success. The default is paginated A4 with 36-point margins.
  • Additive writer formatting: literal tabs are available through an explicit indentation-unit overload. The original initializer function type, output defaults and accounting remain compatible.
.package(url: "https://github.com/ThorFuchs/Swift-JSON.git", from: "1.3.0")

Add .product(name: "JSONHTML", package: "swift-json") to use the fifth product. JSONHTML depends on JSON only; core JSON acquires no UI or transfer dependency.

Compatibility and platform scope

Swift tools/compiler 6.4+, Swift language mode 6, and Apple OS/SDK 27+ remain required. Original contributions remain Apache-2.0, with upstream licenses and notices retained. Linux support retains Swift 6.4 on 64-bit Ubuntu 24.04/glibc, ARM64 and x86-64. Full-language wasm32-unknown-wasip1 retains the pinned matching Swift 6.4 WASI SDK and qualified command hosts. Browser hosting, Embedded Swift, WASI threads, wasm64, other Linux distributions and musl require separate qualification.

Portable JSONHTML rendering/native preparation and styled RTF are distinct from the conditional Apple Transferable/PDF boundary. Pure rendering does not start WebKit. Opaque SDK allocations, receiver behavior and caller callbacks remain outside owned instruction quotas; logical retained bytes are not process RSS caps.

The frozen README/changelog retain development/Unreleased labels for the 1.3 work, and SUPPORT retains an older Apple-only platform paragraph. The executed platform scope is stated above and in the versioned Linux/WASI contracts and qualification receipt. These versioned notes bind the new JSONHTML entries to 1.3.0 without changing the qualified commit. The earlier Linux/WASI changes and schema-builder correction in that historical section were already released and are not new 1.3 features.

Qualification

The annotated tag targets 9517233ef0a3c1b961b738df58fe3ee4081d780c, the reviewed merge of #21 and #22. Post-merge Native CI and Linux CI pass all seven qualification lanes, followed by documentation deployment. No branch or tag protection was weakened.

  • Native debug, release and ASAN each execute 270 test functions and 173 parameter invocations; TSAN covers ten concurrent functions, and strict memory-safety compilation passes. Linux executes 256 functions/173 parameter invocations per full run, with its actual architecture-specific sanitizer results recorded separately.
  • The exact source archive is reproduced byte-for-byte, independently extracted and exercised through the full native lane and a fresh remote exact-version five-product consumer. It contains 887 source files plus its manifest. All 49 baseline cap probes retain their exact expected outcomes.
  • Five matching DocC catalogues document 771/771 authored declarations, with 13 executable README examples. The attached documentation matches the tag; the website follows qualified main.
  • Independent syntax: 318 observed / 287 evaluated successes / 31 policy cases. Schema: 2,337 / 2,300 / 37. Exclusions are not evaluated successes. Authored qualification retains 82 public semantic cases, nine budget/report cases and 4,396 deterministic malformed-input replays. The public downstream schema consumer explicitly selects 20 definitions: eight valid, twelve ordinarily invalid, with two separate operational-error probes. It does not establish MCP conformance.
  • Focused export qualification executes 38 functions, plus 65 distinct public consumer outcomes and eight artifacts per runtime on Mac, physical iPhone, iPhone simulator and iPad simulator. This is not 260 distinct behavior cases. Actual Mac drop callbacks, unedited A4.pdf sharing, local Files save/reopen, seven pages and final-content sentinel are separately attributed to native observations and maintainer confirmations. Physical iPad remains deferred under the approved simulator acceptance policy.
  • Browser qualification executes 46 cases across Chromium, Firefox and WebKit with zero skips. Native Safari and human VoiceOver checks are recorded separately; automated WebKit is not native Safari or audible speech evidence. TextEdit rich RTF save can canonically normalize a decomposed key, despite exact emitted/native-decoded RTF; native JSON is the interchange authority.
  • Unchanged-runtime WASI evidence retains 71 qualification commands: Node debug/release root suites execute 256 functions/173 parameter invocations, while WasmKit has the narrower recorded 14-function public-consumer/probe scope. Unavailable WASI sanitizer instrumentation is not counted as a pass. The evidence explicitly binds reused implementation receipts across documentation-only changes.

Performance and boundaries

Six representative workloads have 18 release-native and 54 browser observations. Median generation was 44.693 ms for a 5,000-member formatted object and 71.459 ms for an interactive 1,000-member object with 128 coherent mapped diagnostics. The latter emitted 980,689 bytes, charged 4,202,193 owned work units and peaked at 1,961,378 logical retained bytes. Its actual browser DOM remained below the conservative bound in all three engines; controls and bounded search completed.

These are representative busy-host measurements, not idle A/B, maximum-workload throughput, hard RSS or platform instruction guarantees. The unchanged 10% review trigger and historical streaming/schema performance dispositions remain retained with their original baselines and host-noise limits. No quota/profile increase or new optimization is hidden in this release. SIMD/parallel batch experiments, E11 projection and E12 JSON text-sequence framing remain deferred.

Assets and support

Verify the source, matching compiled DocC, normalized public evidence and qualification JSON against SHA256SUMS. The source/evidence archives have exact manifests; the DocC manifest accompanies its archive. Evidence includes actual command exits, source hashes, nonzero counts and input pins. Private maintainer/device records, credentials, local clones and SDK-linked build binaries are excluded from the public assets.

Online documentation · JSONHTML reference · Release source contracts · Support · Private security reporting.