YAML对象

对象

对象的一组键值对,是用冒号结构来表示
animal: pets
转为JavaScript
{ animal: 'pets' }
YAML也支持另一种写法,将所有的键值对写成一个行内对象
hash: { name: steve, foo: bar }
转为JavaScript
{ hash: { name: 'steve', foo: 'bar'}}
上一篇
YAML简介
下一篇
YAML数组

Copyright © 2015-2026