贡献者: addis
.yaml
或 .yml
)
{key : val, key : val}
-
开头,也可以写成类似 json 的 [val, val, val]
一个转换例子
key1:
key1.1: val1.1
key1.2: val1.2
key1.3:
key1: 1
key2: 2
key1.4: {key1: 1, key2: 2}
key1.5:
- 1
- 2
- 3
key1.6: [1, 2, 3]
key1.7:
- a: b
c: d
- e: f
g: h
对应的 JSON
{
"key1": {
"key1.1": "val1.1",
"key1.2": "val1.2",
"key1.3": {"key1": 1, "key2": 2},
"key1.4": {"key1": 1, "key2": 2},
"key1.5": [1, 2, 3],
"key1.6": [1, 2, 3],
"key1.7": [{"a": "b", "c": "d"}, {"e": "f", "g": "h"}]
}
}