Yaml for configuration
Basic
Use — to separate YAML Documents in one yaml file.
Use *** to declare the end of file.
Use # for annotation
It use indent and left-align to orgnize data in file.
There are 2 kinds of format: block format and inline format.
Array
// Array block format
- ...
- ...
- ...
// Array inline format
[..., ..., ...]
Hashtable
// block format
// key: value
name: XYY
age: 33
// inline format
// {key: value, ...}
{name: XYY, age: 33}
String
It’s not necessary to use quotes(“) for string.
Multi-line strings - |, keep \n - >, collapse words
Advance
Reuse
Use & to mark a reference of data that could be reused in somewhere by *.
Merge hashtable
Use <<: to merge values of another hashtable into current hashtable.