# 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-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

go-yaml-json

 json_ok

hs-hsyaml-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

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +MAP |
   1    0    0    0 +PAIR|
   1    0    0    0 +NODE|
   1    0    0    0 +VAL |
   1    0    0    0 =TEXT|name
   1    4    4    4 -VAL |
   1    4    4    4 -NODE|
   1    4    4    4 =SYNX|:
   1    5    5    5 =WSPC|.
   1    6    6    6 +NODE|
   1    6    6    6 +VAL |
   1    6    6    6 =TEXT|Mark.McGwire
   1   18   18   18 -VAL |
   1   18   18   18 -NODE|
   1   18   18   18 =EOL |\x0a
   2    0   19   19 -PAIR|
   2    0   19   19 +PAIR|
   2    0   19   19 +NODE|
   2    0   19   19 +VAL |
   2    0   19   19 =TEXT|accomplishment
   2   14   33   33 -VAL |
   2   14   33   33 -NODE|
   2   14   33   33 =SYNX|:
   2   15   34   34 +NODE|
   2   15   34   34 =WSPC|.
   2   16   35   35 +VAL |
   2   16   35   35 =SYNX|>
   2   17   36   36 =EOL |\x0a
   3    0   37   37 =DENT|..
   3    2   39   39 =TEXT|Mark.set.a.major.league
   3   25   62   62 =FOLD|\x0a
   4    0   63   63 =DENT|..
   4    2   65   65 =TEXT|home.run.record.in.1998.
   4   26   89   89 =NEWL|\x0a
   5    0   90   90 -VAL |
   5    0   90   90 -NODE|
   5    0   90   90 -PAIR|
   5    0   90   90 +PAIR|
   5    0   90   90 +NODE|
   5    0   90   90 +VAL |
   5    0   90   90 =TEXT|stats
   5    5   95   95 -VAL |
   5    5   95   95 -NODE|
   5    5   95   95 =SYNX|:
   5    6   96   96 +NODE|
   5    6   96   96 =WSPC|.
   5    7   97   97 +VAL |
   5    7   97   97 =SYNX||
   5    8   98   98 =EOL |\x0a
   6    0   99   99 =DENT|..
   6    2  101  101 =TEXT|65.Home.Runs
   6   14  113  113 =NEWL|\x0a
   7    0  114  114 =DENT|..
   7    2  116  116 =TEXT|0.278.Batting.Average
   7   23  137  137 =NEWL|\x0a
   8    0  138  138 -VAL |
   8    0  138  138 -NODE|
   8    0  138  138 -PAIR|
   8    0  138  138 -MAP |
   8    0  138  138 -NODE|
   8    0  138  138 -DOC |

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'}