例如,当需要嵌入一个\n或者Unicode字符时双引号是非常有用的。...\x1a, \e, \x1c, \x1d, \x1e, \x1f, \N, \_, \L, \P
最后,下列这些情况下,字符串必须使用引号包含:
当字符串是true或者false时(否则会被认为是boolean...Propel: 1.2
"symfony 1.2":
PHP: 5.2
Propel: 1.3
下面的PHP代码与上述的YAML等价
array(
'symfony 1.0' => array...(
'PHP' => 5.0,
'Propel' => 1.2,
),
'symfony 1.2' => array(
'PHP' => 5.2,
'..."symfony 1.0": { PHP: 5.0, Propel: 1.2 }
"symfony 1.2": { PHP: 5.2, Propel: 1.3 }
注释
在YAML中使用#开始表示注释内容