Yaml Introduction Flashcards
1
Q
How are Key-Value pairs represented?
A
Fruit: Apple
Vegetable: Carrot
2
Q
How are Arrays represented?
A
Fruits:
- Orange
- Apple
- Banana
3
Q
How are Dictionaries/Maps represented?
A
Banana:
Calories: 105
Fat: 0.4 g
Carbs: 27 g
Same amount of blank spaces in front of sub-elements
4
Q
Is it possible to have lists containing dictionaries containing lists?
A
Yes.
Fruits:
- Banana:
Calories: 105 Fat: 0.4 g Carbs: 25 g
Spacing ist the important part, or else errors are being thrown
5
Q
How are Dictionaries and Lists ordered?
A
- Lists are ordered
- Dictionaries are unordered
Two lists with different orders are not equal.
Two Dictionaries with different orders are equal.
6
Q
How do Comments look in Yaml?
A
Starting with a #
7
Q
How does a list of dictionaries look?
A
Payslips: - Month: June Wage: 4000 - Month: July Wage: 4000