# YAML Test Matrix

--- &test-HMK4
  Title: Spec Example 2.16. Indentation determines scope
  Tags: [ folded, literal, spec ]

YAML

name: Mark McGwire
accomplishment: >
  Mark set a major league
  home run record in 1998.
stats: |
  65 Home Runs
  0.278 Batting Average

Expected Events

+STR
+DOC
+MAP
=VAL :name
=VAL :Mark McGwire
=VAL :accomplishment
=VAL >Mark set a major league home run record in 1998.\n
=VAL :stats
=VAL |65 Home Runs\n0.278 Batting Average\n
-MAP
-DOC
-STR

Expected JSON

{
"accomplishment": "Mark set a major league home run record in 1998.\n",
"name": "Mark McGwire",
"stats": "65 Home Runs\n0.278 Batting Average\n"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-syck-json

 json_ok

perl-tiny-json

 json_ok

perl-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-pp-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl-pplibyaml-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl-syck-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl-tiny-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl-xs-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

perl-yaml-perl

 na
{
  'accomplishment' => 'Mark set a major league home run record in 1998.
',
  'name' => 'Mark McGwire',
  'stats' => '65 Home Runs
0.278 Batting Average
'
}

py-pyyaml-py

 na
{'accomplishment': 'Mark set a major league home run record in 1998.\n',
 'name': 'Mark McGwire',
 'stats': '65 Home Runs\n0.278 Batting Average\n'}

py-ruamel-py

 na
{'accomplishment': 'Mark set a major league home run record in 1998.\n',
 'name': 'Mark McGwire',
 'stats': '65 Home Runs\n0.278 Batting Average\n'}