YAML stands for YAML Ain't Markup Language (a recursive acronym). It started as "Yet Another Markup Language" but was redefined to distance itself from just being a markup language like XML.
Common Use Cases:
name: John Doe
age: 30
city: New Yorkfruits:
- Apple
- Banana
- Orangefruits: [Apple, Banana, Orange]person:
name: John Doe
age: 30
hobbies:
- hiking
- reading
- coding
address:
street: 123 Main St
city: New York| Feature | YAML | JSON |
|---|---|---|
| Readability | High, less punctuation | Lower, more brackets and quotes |
| Comments | Yes | No |
| Multi-line Strings | Easy (with | or >) | Difficult (requires \n) |