--- %YAML:1.0
test: Multiple quoted string on one line
brief: >
Multiple quoted string on one line
yaml: |
stripped_title: { name: "foo bar", help: "bar foo" }
php: |
array('stripped_title' => array('name' => 'foo bar', 'help' => 'bar foo'))
---
test: Empty sequence
foo: [ ]
array('foo' => array())
test: Empty value
foo:
array('foo' => null)
test: Inline string parsing
Inline string parsing
test: ['complex: string', 'another [string]']
array('test' => array('complex: string', 'another [string]'))
test: Boolean
Boolean
- false
- true
- null
- ~
- 'false'
- 'true'
- 'null'
- '~'
array(
false,
true,
null,
'false',
'true',
'null',
'~',
)
test: Empty lines in folded blocks
Empty lines in folded blocks
bar: |
foo
bar
array('foo' => array('bar' => "foo\n\n\n \nbar\n"))
test: IP addresses
IP addresses
foo: 10.0.0.2
array('foo' => '10.0.0.2')
test: A sequence with an embedded mapping
A sequence with an embedded mapping
- foo
- bar: { bar: foo }
array('foo', array('bar' => array('bar' => 'foo')))
test: A sequence with an unordered array
A sequence with an unordered array
1: foo
0: bar
array(1 => 'foo', 0 => 'bar')
test: Octal
brief: as in spec example 2.19, octal value is converted
foo: 0123
array('foo' => 83)
test: Octal strings
brief: Octal notation in a string must remain a string
foo: "0123"
array('foo' => '0123')
foo: '0123'
foo: |
0123
array('foo' => "0123\n")
test: Document as a simple hash
brief: Document as a simple hash
{ foo: bar }
array('foo' => 'bar')
test: Document as a simple array
brief: Document as a simple array
[ foo, bar ]
array('foo', 'bar')