YAML Flashcards
How does YAML represent data?
as key-value paris
What are three dashes — at the top of a YAML document?
indicate start of the document
The set of key-value pair is commonly referred to as what? (3)
- Dictionary
- Hash
- Map
Do keys in the dictionary must be unique?
yes
What type of data can be values? (4)
- string
- intiger
- list of objects
- another dictionary
In YAML, how is each item in a list signified?
by two spaces, a dash, another space and the item in the list
What does it mean that YAML is an indentation based language?
indentation (whitespace) is used to delimit blocks of code, instead of using braces or keywords - the structure of the code is determined by the indentation levels
Why is correct indentation crucial?
improper indentation can cause errors or change the logic of the code