YAML数组

一组连词线开头的行,构成一个数组
- Cat
- Dog
- Goldfish

转为JavaScript

[ 'Cat', 'Dog', 'Goldfish' ]
数据的子结构也是一个数组,可以在该项下面缩进空格来表示层级关系
-
  - Cat
  - Dog
  - Goldfish
转为JavaScript

[ [ 'Cat', 'Dog', 'Goldfish'] ]
数组也可以采用行内表示法

animal: [Cat, Dog]
转为JavaScript

{ animal: ['Cat', 'Dog']}

联系我们

邮箱 626512443@qq.com
电话 18611320371(微信)
QQ群 235681453

Copyright © 2015-2022

备案号:京ICP备15003423号-3