Expand description
Documents on disk, as JSON or TOML, in every app (standard §2.2,
decision 0017): pipelines, recipes, op descriptions, settings. TOML is easier to write by hand
(dsp-kitchen’s pipelines were the first to take it); JSON is what tools write. Either reads into
the same document, and a document’s content id is the hash of its canonical JSON
(content_id), so the format a person chose never changes an id.
Enums§
- DocFormat
- How a document is written.
Functions§
- content_
id - A document’s content id: the hash of its canonical JSON, the same for its JSON and TOML forms.
- parse
textinformatas aT(aPipeline, anOpSpec, …).- read
- The document at
path(.jsonor.toml). - render
valueas text informat: pretty JSON, or TOML (which has no null: absent fields are left out, as the contract’s types already do).- to_
value textinformatas a JSON value (what a document is, whatever it was written in).- write
- Writes
valuetopathin the format its extension names.