Definitions
The header's definition section — metadata, variables, and references.
Besides the schema, an Internet Object document's header can hold definitions. A definition is a key–value pair on its own line, introduced by a tilde ~:
~ key: valueThere are three kinds of definition, distinguished by the key's prefix:
(none)
Metadata
Document-level data (paging, status, …). Surfaces in the output header.
The special key $schema names the document's default schema.
Metadata
Bare keys carry document metadata. They appear under a header in the loaded result, separate from the data:
~ pageSize: 10
~ success: T
~ $schema: { name: string }
---
~ John
~ JaneVariables and references
@ defines a value variable; $ defines a reusable schema (a ref). Both are then used by name:
A document may be header-only. If there is no data, the header still ends with the
---separator.
See Also
Header — where definitions live in a document
Variables — value variables (
@)Schema References — schema and type refs (
$)
Last updated
Was this helpful?
