Skip to main content

YAML Datatypes

In YAML there are three types data types:

  • Scalars: Scalars are values like Strings, Integers, Booleans, etc.
  • Sequences: Sequences are lists with each item starting with a hyphen (-). Lists can also be nested.
  • Mappings: Mapping gives the ability to list keys with values. They are like dictionaries or hash maps.

A YAML file is rarely used to describe a simple scalar. Most of the time, it describes a collection.

YAML collections can be a sequence or a mapping of elements.


Each datatype will be discussed in detail in next chapters.