Format: Key Value Pair
Fruit: apple
vegetable: carrot
liquid: water
Format: Array/Lists
Fruits
- apple
- orange
- banana
Vegetables:
- Carrot
- cauliflawer
- tomato
Format: Dictionary/Map
Banana:
calories: 105
fat: 0.4g
carbs: 27 g
Grapes:
calories: 62
fat: 0.3g
carbs: 16g
Rules about Yaml files
- **equal amount of Spaces are important to differentiate the key and value
- Dictionaries are unordered collection whereas list are ordered
- orders does not matters in dictionaries
- In lists or arrays orders do matter
Dictionary
Color: Blue
Model: Corvette
Transmission: Manual
Price: $20,000
Dictionary in Dictionary
Color: Blue
Model:
Name: Corvette
Year: 1995
Transmission: Manual
Price: $20,000