Skip to content

YAML Structure

Learn how to structure YAML documents with multiple entries using directives separated by --- and terminated with ..., including nested key-value pairs and lists.

YAML Structure

In YAML, there can be multiple directives or documents in a single file.

The separation of documents in YAML is made with three dashes (---) and the end of document is marked with three dots (...).

For example:

---
first_name: Tom
last_name: Nolan
hair_color: Black
married: true
spouse:
	name: Greta
	occupation: Doctor
	interests: 
		- Gardening
		- Instagram

---
first_name: Luke
last_name: Smith
hair_color: Brown
married: false
...
Navigation