yaml value

The yaml value type represents a YAML value. This can be any of the following:

  • Null: Represented as null, ~ or with no value at all (i.e. leaving a key value empty)
  • Boolean: Represented as true or false
  • Integer: an integer number.
  • Floating Point: a floating-point number, written in a human-readable format, with a dot separating the fractional part.
  • String: A Unicode string. YAML supports single-quoted, double-quoted, or unquoted strings. Escaping is done with backslashes in double-quoted strings. An empty string (e.g. '') is different from Null.
  • Array (Sequence): A sequence of values, represented as a list with each item prefixed by a dash - and aligned at the same indentation level. The values do not need to be of the same type.
  • Object (Mapping): A collection of key-value pairs, where keys are strings and values can be any valid YAML value. These mappings are separated by a colon : and structured using indentation to denote hierarchy. Keys must be unique within a mapping.

In our implementation, we use our own definitions of the terms "key" and "value".

We store the entire "YAML object" in a yaml value. Each key-value pair inside it is a yaml key. The "key" in a key-value pair is just a string and we refer to it as the "name of the key". The "value" in a key-value pair is another yaml value.

Our YAML parser is implemented using the yaml-cpp library, available at https://github.com/jbeder/yaml-cpp.

For more information, see the YAML key page.

Version Platforms
11.0.5.0 AIX, Debian, Mac, Raspbian, Red Hat, SUSE, Solaris, Ubuntu, Windows

Creation

value of <yaml key> : yaml value
yaml of <file> : yaml value
yaml of <string> : yaml value

Properties

element <integer> of <yaml value> : yaml value
element of <yaml value> : yaml value
key <string> of <yaml value> : yaml key
key of <yaml value> : yaml key
path <string> of <yaml value> : yaml value
type of <yaml value> : string

Casts

<yaml value> as boolean : boolean
<yaml value> as float : floating point
<yaml value> as integer : integer
<yaml value> as string : string

Operators