The structure of a YAML file

The following are the building blocks of a YAML file:

  1. Key Value Pair – The basic type of entry in a YAML file is of a key value pair. After the Key and colon there is a space and then the value.
  2. Arrays/Lists – Lists would have a number of items listed under the name of the list. The elements of the list would start with a -. There can be a n of lists, however the indentation of various elements of the array matters a lot.
  3. Dictionary/Map – A more complex type of YAML file would be a Dictionary and Map.