Yaml Introduction Flashcards

1
Q

How are Key-Value pairs represented?

A

Fruit: Apple
Vegetable: Carrot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How are Arrays represented?

A

Fruits:
- Orange
- Apple
- Banana

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do Comments look in Yaml?

A

Starting with a #

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a list of dictionaries look?

A
Payslips:
   - Month: June
    Wage: 4000

	- Month: July
	  Wage: 4000
	 
How well did you know this?
1
Not at all
2
3
4
5
Perfectly