# YAML Test Matrix

--- &test-J9HZ
  Title: Spec Example 2.9. Single Document with Two Comments
  Tags: [ comment, mapping, sequence, spec ]

YAML

---
hr: # 1998 hr ranking
  - Mark McGwire
  - Sammy Sosa
rbi:
  # 1998 rbi ranking
  - Sammy Sosa
  - Ken Griffey

Expected Events

+STR
+DOC ---
+MAP
=VAL :hr
+SEQ
=VAL :Mark McGwire
=VAL :Sammy Sosa
-SEQ
=VAL :rbi
+SEQ
=VAL :Sammy Sosa
=VAL :Ken Griffey
-SEQ
-MAP
-DOC
-STR

Expected JSON

{
"hr": [
"Mark McGwire",
"Sammy Sosa"
],
"rbi": [
"Sammy Sosa",
"Ken Griffey"
]
}

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 =HEAD|---
   1    3    3    3 +NODE|
   1    3    3    3 =EOL |\x0a
   2    0    4    4 +MAP |
   2    0    4    4 +PAIR|
   2    0    4    4 +NODE|
   2    0    4    4 +VAL |
   2    0    4    4 =TEXT|hr
   2    2    6    6 -VAL |
   2    2    6    6 -NODE|
   2    2    6    6 =SYNX|:
   2    3    7    7 +NODE|
   2    3    7    7 =WSPC|.
   2    4    8    8 +COMM|
   2    4    8    8 =SYNX|#
   2    5    9    9 =META|.1998.hr.ranking
   2   21   25   25 -COMM|
   2   21   25   25 =EOL |\x0a
   3    0   26   26 +SEQ |
   3    0   26   26 =DENT|..
   3    2   28   28 =SYNX|-
   3    3   29   29 =WSPC|.
   3    4   30   30 +NODE|
   3    4   30   30 +VAL |
   3    4   30   30 =TEXT|Mark.McGwire
   3   16   42   42 -VAL |
   3   16   42   42 -NODE|
   3   16   42   42 =EOL |\x0a
   4    0   43   43 =DENT|..
   4    2   45   45 =SYNX|-
   4    3   46   46 =WSPC|.
   4    4   47   47 +NODE|
   4    4   47   47 +VAL |
   4    4   47   47 =TEXT|Sammy.Sosa
   4   14   57   57 -VAL |
   4   14   57   57 -NODE|
   4   14   57   57 =EOL |\x0a
   5    0   58   58 -SEQ |
   5    0   58   58 -NODE|
   5    0   58   58 -PAIR|
   5    0   58   58 +PAIR|
   5    0   58   58 +NODE|
   5    0   58   58 +VAL |
   5    0   58   58 =TEXT|rbi
   5    3   61   61 -VAL |
   5    3   61   61 -NODE|
   5    3   61   61 =SYNX|:
   5    4   62   62 +NODE|
   5    4   62   62 =EOL |\x0a
   6    0   63   63 =WSPC|..
   6    2   65   65 +COMM|
   6    2   65   65 =SYNX|#
   6    3   66   66 =META|.1998.rbi.ranking
   6   20   83   83 -COMM|
   6   20   83   83 =EOL |\x0a
   7    0   84   84 +SEQ |
   7    0   84   84 =DENT|..
   7    2   86   86 =SYNX|-
   7    3   87   87 =WSPC|.
   7    4   88   88 +NODE|
   7    4   88   88 +VAL |
   7    4   88   88 =TEXT|Sammy.Sosa
   7   14   98   98 -VAL |
   7   14   98   98 -NODE|
   7   14   98   98 =EOL |\x0a
   8    0   99   99 =DENT|..
   8    2  101  101 =SYNX|-
   8    3  102  102 =WSPC|.
   8    4  103  103 +NODE|
   8    4  103  103 +VAL |
   8    4  103  103 =TEXT|Ken.Griffey
   8   15  114  114 -VAL |
   8   15  114  114 -NODE|
   8   15  114  114 =EOL |\x0a
   9    0  115  115 -SEQ |
   9    0  115  115 -NODE|
   9    0  115  115 -PAIR|
   9    0  115  115 -MAP |
   9    0  115  115 -NODE|
   9    0  115  115 -DOC |

perl-pp-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-pplibyaml-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-syck-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-tiny-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-xs-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

perl-yaml-perl

 na
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             'Sammy Sosa',
             'Ken Griffey'
           ]
}

py-pyyaml-py

 na
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}

py-ruamel-py

 na
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}