In YAML, a dictionary (called a mapping) is a collection of key-value pairs. Itβs basically like a JSON object or Python dict but way easier to read thanks to indentation.
π Example: Basic Dictionary
Parsed key values will appear here...
π‘ Pro Tip: YAML mappings use key: followed by a space and value. Indent nested mappings with consistent 2 or 4 spaces.
π Nesting Dictionaries
Dictionaries can nest inside each other for deeper data structures.
π This is how config files, manifests, and structured settings are usually built.
π Summary
YAML dictionaries use key: value pairs
Values can be strings, numbers, booleans, lists, or other dictionaries
Indentation defines nesting
No curly braces or commas needed β clean af
π§ Bonus: Inline Dictionaries
You can also write simple one-line mappings with curly braces if needed, but multi-line nested style is clearer and preferred in YAML culture.