v0.2.0 — Typed vocabularies
Backfilled release note. Originally tagged 2026-06-15; the publish date above is when
this GitHub release entry was created.
Added
- Typed vocabularies: optional, opt-in-beyond-core validation of typed values (single-key
objects whose key starts with#, e.g.{#utc ...}) against the official vocabularies —
core, time, network, math, spatial, color, and geo — plus user-registered custom
vocabularies. NewRon::validate(), andvocabularies/registryoptions on
Ron::fromJson,Ron::canonicalRon, andRon::canonicalHash. The core vocabulary is
validated by default; passvocabularies: []to disable. Validation preserves the value
model, so typed values round-trip losslessly;Ron::toJsonis not validated. Mbolli\Ron\Vocabulary\VocabularyRegistry(official(),register(),replace()) for
declaring custom, reverse-DNS-namespaced vocabularies. A validator returnstrue/false
to accept/reject, any other value to transform the payload, orreplace($v)to set a
literal (e.g. boolean) payload.
Changed
- A single
#-prefixed key now renders in collapsed typed form ({#tag payload}), with the
wrapper transparent to indentation and multi-key payloads allowed to inline, matching the
updated RON spec and ron-go. This changes the rendered RON for documents containing
single-key#-objects.
Full changelog: CHANGELOG.md · v0.1.1...v0.2.0