YAML uses indentation for scope and newlines to separate entities. Elements in a sequence start with a dash followed by a space. The key and value are separated by a color, and a hash sign is used for comments. This is what a sample YAML file can look like:
# list of characters
characters:
- name: "Henry"
surname: "Armitage"
year_of_birth: 1855
job: "librarian"
- name: "Francis"
surname: "Wayland Thurston"
job: "anthropologist"
One of the more important differences between JSON and YAML is that, while the first can only use strings as keys, the latter can use any kind of scalar value (strings, numbers, and Booleans).