Release 1.25.0
What's New
Features
-
JSON input method for RIDDL models — A new, correct-by-construction
way to build a RIDDL model from a structured JSON document, as an
alternative to parsing RIDDL surface text.RiddlLib.parseJson(json, origin)maps the JSON onto the RIDDL AST, applies RIDDL's required
type-expression defaults, and returns aRootthat the standard passes
validate and PrettifyPass renders as guaranteed-valid.riddltext.
A companionRiddlLib.validateRoot(root)validates an already-built
Rootwithout round-tripping through text. This is intended for
programmatic and AI-assisted generation: a producer emits JSON (a format
it handles reliably, and one that supports schema-constrained decoding)
and RIDDL guarantees the model is well-formed.The JSON schema covers the entire RIDDL language — every definition
(domains, contexts, entities, all processors: adaptors, streamlets with
inlets/outlets/connectors, projectors, repositories with schemas,
relationships; sagas, modules and subdomains, epics/use-cases with all
twelve interaction kinds, and UI groups/inputs/outputs), every type
expression, the full statement language, functions and methods, and rich
metadata (descriptions, glossary terms, options, author references,
attachments, comments). References are emitted as path identifiers and
resolved by the standard passes, so undefined references surface as normal
validation errors. The whole path is Native-safe (no I/O; upickle
cross-compiled for JVM, JS, and Native).On the JavaScript/TypeScript side,
RiddlAPI.parseJson(json, origin)is
exposed and documented inindex.d.ts. The JSON schema is documented in
JSON_INPUT.md, with example models underriddlLib/json-examples/, and
a coverage ledger (JSON_COVERAGE.md) enforced by an automated guard test
that fails the build if a new AST construct lacks JSON support.
Bug Fixes
- Prettify rendered outputs with a duplicated verb —
OutputUI
elements were emitted as invalid RIDDL (e.g.output displays X displays "...") because the prettifier combinedOutput.identify(which already
includes the verb alias) with the verb alias again. Outputs now render as
output X displays "..."and re-parse correctly.
Internal
- Deduplicated
RiddlLib's validation-result handling (validateString,
validateStringQuick,validateRoot, andvalidateIncrementalnow share
common helpers). No behavior change. - All additions are backward-compatible: no public API was removed or
changed;parseJson,validateRoot, and the JSON package are new.