Skip to main content

YAML Pairs

YAML Pairs

YAML Pair (!!pairs) is an ordered sequence of key:value pairs allowing duplicates.

YAML Pair is a common type used for modeling is the ordered list of named values, allowing duplicates.

note

The !!pairs tag may be given explicitly.

Alternatively, the application may choose to implicitly type a sequence of single-key mappings to pairs. In this case, an explicit !!seq transfer must be given to sequences of single-key mappings that do not represent pairs.

For example:

Block-tasks: !!pairs
- meeting: with team.
- meeting: with boss.
- break: lunch.
- meeting: with client.
Equivalent JSON
{
"Block-tasks": [
[
"meeting",
"with team."
],
[
"meeting",
"with boss."
],
[
"break",
"lunch."
],
[
"meeting",
"with client."
]
]
note

You can also use the flow style:

Flow-tasks: !!pairs [ meeting: with team, meeting: with boss ]

Table of Contents