A Brief Introduction to YAML#
There are many features and functionalities of YAML. iVABS only use the most basic ones. More about YAML can be found from:
Basic syntax#
Collections and structures#
Mappings use a colon and space (:
) to mark each key/value pair:
key1: value1
key2: value2
Supported value types are number, string, and boolean.
Numbers can be integers or real numbers.
Strings should be put in double quotes ("abc"
).
Booleans can be true
/false
, yes
/no
, or on
/off
.
Sequences indicate each entry with a dash and space (-
):
- value1
- value2
Sequences can also be indicated using square brackets and commas:
[value1, value2, ...]
Indentation of whitespace is used to denote structure.
key:
subkey1:
subsubkey: subsubvalue
subkey2: subvalue
Mappings and sequences can be mixed.
key:
- value1
- value2
- subkey: [subvalue1, subvalue2, ...]
Comments begin with a hash tag (#
).
# A line of coment.
Scalars#
Literal blocks are indicated by a vertical bar (|
):
key: |
Any characters can be placed here.
Line breaks will be preserved.