YAML 笔记

                     

贡献者: addis

  • 本文处于草稿阶段。
预备知识 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
对应的 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"}]
  }
}

                     

© 小时科技 保留一切权利