# Sample YAML file from 99helpers.com/file-types/yaml
# Free to use for testing. The numbered comments mark the parts
# explained on that page.

# 1. Document start marker: optional when a file holds one document
---
# 2. "key: value" pairs form a mapping. Plain strings need no quotes.
name: Sample web app
version: "2.10"          # 3. Quoted, so it stays text (2.10 would load as 2.1)
debug: false             # 4. A boolean
port: 8080               # 5. An integer
ratio: 0.75              #    a float
owner: null              # 6. Null, also written ~ or left empty
released: 2026-10-27     # 7. A date: many loaders turn this into a date object

# 8. Nesting by indentation: spaces only, never tabs
database:
  host: db.example.internal
  port: 5432
  options:
    ssl: true
    timeout_seconds: 30

# 9. A block sequence: one item per line, each after "- "
languages:
  - en
  - nl
  - fr

# 10. Flow style: JSON-like brackets and braces work too
tags: [web, demo, sample]
limits: {requests_per_minute: 120, burst: 20}

# 11. A list of mappings, the usual shape for servers, steps or users
servers:
  - name: web-1
    region: eu-west
  - name: web-2
    region: us-east

# 12. An anchor (&) names a node, an alias (*) reuses it,
#     and the "<<" merge key copies a mapping's keys
defaults: &defaults
  retries: 3
  log_level: info
worker:
  <<: *defaults
  log_level: debug       # overrides the merged value

# 13. Multi-line text: | keeps line breaks, > folds them into spaces
welcome_message: |
  Hello, and welcome.
  This text keeps its line breaks.
summary: >
  This sentence is written over
  two lines but loads as one.

# 14. Strings that need quotes
country: "NO"                   # unquoted NO is false in YAML 1.1
windows_path: 'C:\Users\ada'    # single quotes: backslashes stay as they are
escapes: "tab:\t, new line:\n"  # double quotes: backslash escapes work
colon_text: "Note: quoted because of the colon and space"
unicode: "Grüße, こんにちは, مرحبا, 🙂"

# 15. Document end marker: optional
...
