Definitions
Last updated
Last updated
Apart from the schema, the IO document header can have definitions. The definitions allow you to define schema, variables, metadata, and much more. In essence, the definitions are the collection of key-value pairs, with the following structure.
Whitespaces surrounding the tokens, keys, and values are optional.
The definition must start with a tidal symbol (~ U+007E)
followed by a key-value pair. The key-value pair must be separated by a colon (: U+003A)
.
Element
Unicode
Details
~
U+007E
Tilde - Starts the definition
:
U+003A
Colon - Key and Value Separator
Key
N/A
Value
N/A
WS
WhiteSpace Char
0 or more white-space character
Simple definitions such as meta-data declaration can be written as shown in the code snippet below.
Any value defined in the definition section can be used as a variable. The dollar $ prefix can be used to declare schema and/or consume the variable value. If the key starts with $
a sign the variable will be treated as a schema and handled likewise.
Here in the code snippet, y: yes
and n: no
are used as value definition similarly keys in the schema prefixed with $
sign represents schema definitions.
An Internet object document may only contain the header section and not a data section. In such a case, the header section must be separated from the data section by a data separator "---".
The string key, as defined in the .
The values as defined in the .