Serialization (SML)
All Platform Content represented in SedaroML is open and exportable to human-readable formats — in Sedaro, there is no vendor lock. The interchange form is an SML document: model data and model schema, together in one self-describing, version-controllable text artifact.
Anatomy of an SML Document
An SML document is a multi-document YAML payload:
# Document 1: instance data
- id: PNzY3Mjc1Nj
type: Pendulum
name: "demo pendulum"
length: 1.0
angle: 0.1
---
# Document 2: schema
version: "1.0"
ontologies:
- model: Pendulum
supers: []
fields:
length: { type: f64, docs: "The length of the pendulum in meters." }
angle: { type: rad, format: typed, docs: "The angle of the pendulum in radians." }
The Data Document
Serialized instances, each carrying its id, type, name, field values, and relationships. Relationship fields serialize as the target instance's ID, so the object graph round-trips faithfully — including cross-references outside the composition tree. Uncertain quantities serialize as their distribution (type + parameters), not just a nominal value.
The Schema Document
The type definitions needed to interpret and edit the data:
version— schema format version.ontologies— one entry per ontology: its name, supertypes (supers), and fields. Each field records its SedaroTS type, aformat(rawfor plain values,typedfor typed datums), its documentation, and expositions — extra metadata such as relationship targets/reverses and enum references.enums— enum definitions (name and variants) referenced by fields.categories— optional grouping metadata so editors and UIs can present large ontology libraries in curated groups.
Because documentation is part of the language, docs flow into the schema automatically — a schema is simultaneously machine-readable and human-reference material.
Ontologies can customize their schema presentation (hide internal fields, fix field ordering) without affecting model semantics.
SML documents capture model structure and data; behaviors and their queries are not part of the SML schema. SML generation currently emits YAML.
Generation and parsing APIs are described in the Python Representation.