YAML
YAML Ain't Markup Language:
- YAML uses indentation to distinguish layers (same indentation - same layer) - use spaces, because tabs are not allowed.
- YAML start with three dashes: ---
- YAML disctionary in key-value pair in one of two forms:
- colon separated key (like Python dictionary):
- key: value
- indentation separated key:
- key:
- value
- Also one key can contain nested dictionary:
- Method 1:
- first_level_key:
- second_level_key_under_the_first_level: second_level_value
- Method 2:
- first_level_key: {second_level_key_under_the_first_level: second_level_value}
- YAML uses dashes as indentation to represent list of items (use lists when you want key to have more than one values which are not keys themselves):
- Methos 1:
- this_is_a_list:
- - element_1
- - element_2
- Method 2:
- this_is_a_list : [element_1, elemenet_2]
No comments:
Post a Comment