Schema Representation
How a schema is written and how data is mapped to it — open/closed, positional/keyed, and the default schema.
Open and closed schema objects
name, age, address
---
John, 30, { Main St, NYC }name: string, address: { street: string, city: string }
---
John, { Main St, NYC }How data maps to a schema
~ $schema: { name: string, age: int }
---
~ John, 30 # positional: maps to name, age
~ { name: Mary, age: 25 } # keyed: maps by nameMixing positional and keyed values
Nested objects and arrays
Choosing the schema
The default schema
Reusable named schemas
No schema
See Also
Last updated
Was this helpful?
