# YAML Test Matrix

--- &test-YD5X
  Title: Spec Example 2.5. Sequence of Sequences
  Tags: [ sequence, spec ]

YAML

- [name        , hr, avg  ]
- [Mark McGwire, 65, 0.278]
- [Sammy Sosa  , 63, 0.288]

Expected Events

+STR
+DOC
+SEQ
+SEQ []
=VAL :name
=VAL :hr
=VAL :avg
-SEQ
+SEQ []
=VAL :Mark McGwire
=VAL :65
=VAL :0.278
-SEQ
+SEQ []
=VAL :Sammy Sosa
=VAL :63
=VAL :0.288
-SEQ
-SEQ
-DOC
-STR

Expected JSON

[
[
"name",
"hr",
"avg"
],
[
"Mark McGwire",
65,
0.278
],
[
"Sammy Sosa",
63,
0.288
]
]

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

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-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

dotnet-yamldotnet-json

 json_diff
[
  [
    "name",
    "hr",
    "avg"
  ],
  [
    "Mark McGwire",
    "65",
    "0.278"
  ],
  [
    "Sammy Sosa",
    "63",
    "0.288"
  ]
]

perl-tiny-json

 json_diff
[
  "[name        , hr, avg  ]",
  "[Mark McGwire, 65, 0.278]",
  "[Sammy Sosa  , 63, 0.288]"
]

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +SEQ |
   1    0    0    0 =SYNX|-
   1    1    1    1 =WSPC|.
   1    2    2    2 +NODE|
   1    2    2    2 +SEQ |
   1    2    2    2 =SYNX|[
   1    3    3    3 +NODE|
   1    3    3    3 +VAL |
   1    3    3    3 =TEXT|name
   1    7    7    7 -VAL |
   1    7    7    7 -NODE|
   1    7    7    7 =WSPC|........
   1   15   15   15 =SYNX|,
   1   16   16   16 =WSPC|.
   1   17   17   17 +NODE|
   1   17   17   17 +VAL |
   1   17   17   17 =TEXT|hr
   1   19   19   19 -VAL |
   1   19   19   19 -NODE|
   1   19   19   19 =SYNX|,
   1   20   20   20 =WSPC|.
   1   21   21   21 +NODE|
   1   21   21   21 +VAL |
   1   21   21   21 =TEXT|avg
   1   24   24   24 -VAL |
   1   24   24   24 -NODE|
   1   24   24   24 =WSPC|..
   1   26   26   26 =SYNX|]
   1   27   27   27 -SEQ |
   1   27   27   27 -NODE|
   1   27   27   27 =EOL |\x0a
   2    0   28   28 =SYNX|-
   2    1   29   29 =WSPC|.
   2    2   30   30 +NODE|
   2    2   30   30 +SEQ |
   2    2   30   30 =SYNX|[
   2    3   31   31 +NODE|
   2    3   31   31 +VAL |
   2    3   31   31 =TEXT|Mark.McGwire
   2   15   43   43 -VAL |
   2   15   43   43 -NODE|
   2   15   43   43 =SYNX|,
   2   16   44   44 =WSPC|.
   2   17   45   45 +NODE|
   2   17   45   45 +VAL |
   2   17   45   45 =TEXT|65
   2   19   47   47 -VAL |
   2   19   47   47 -NODE|
   2   19   47   47 =SYNX|,
   2   20   48   48 =WSPC|.
   2   21   49   49 +NODE|
   2   21   49   49 +VAL |
   2   21   49   49 =TEXT|0.278
   2   26   54   54 -VAL |
   2   26   54   54 -NODE|
   2   26   54   54 =SYNX|]
   2   27   55   55 -SEQ |
   2   27   55   55 -NODE|
   2   27   55   55 =EOL |\x0a
   3    0   56   56 =SYNX|-
   3    1   57   57 =WSPC|.
   3    2   58   58 +NODE|
   3    2   58   58 +SEQ |
   3    2   58   58 =SYNX|[
   3    3   59   59 +NODE|
   3    3   59   59 +VAL |
   3    3   59   59 =TEXT|Sammy.Sosa
   3   13   69   69 -VAL |
   3   13   69   69 -NODE|
   3   13   69   69 =WSPC|..
   3   15   71   71 =SYNX|,
   3   16   72   72 =WSPC|.
   3   17   73   73 +NODE|
   3   17   73   73 +VAL |
   3   17   73   73 =TEXT|63
   3   19   75   75 -VAL |
   3   19   75   75 -NODE|
   3   19   75   75 =SYNX|,
   3   20   76   76 =WSPC|.
   3   21   77   77 +NODE|
   3   21   77   77 +VAL |
   3   21   77   77 =TEXT|0.288
   3   26   82   82 -VAL |
   3   26   82   82 -NODE|
   3   26   82   82 =SYNX|]
   3   27   83   83 -SEQ |
   3   27   83   83 -NODE|
   3   27   83   83 =EOL |\x0a
   4    0   84   84 -SEQ |
   4    0   84   84 -NODE|
   4    0   84   84 -DOC |

perl-pp-perl

 na
[
  [
    'name',
    'hr',
    'avg'
  ],
  [
    'Mark McGwire',
    65,
    '0.278'
  ],
  [
    'Sammy Sosa',
    63,
    '0.288'
  ]
]

perl-pplibyaml-perl

 na
[
  [
    'name',
    'hr',
    'avg'
  ],
  [
    'Mark McGwire',
    65,
    '0.278'
  ],
  [
    'Sammy Sosa',
    63,
    '0.288'
  ]
]

perl-syck-perl

 na
[
  [
    'name',
    'hr',
    'avg'
  ],
  [
    'Mark McGwire',
    65,
    '0.278'
  ],
  [
    'Sammy Sosa',
    63,
    '0.288'
  ]
]

perl-tiny-perl

 na
[
  '[name        , hr, avg  ]',
  '[Mark McGwire, 65, 0.278]',
  '[Sammy Sosa  , 63, 0.288]'
]

perl-xs-perl

 na
[
  [
    'name',
    'hr',
    'avg'
  ],
  [
    'Mark McGwire',
    65,
    '0.278'
  ],
  [
    'Sammy Sosa',
    63,
    '0.288'
  ]
]

perl-yaml-perl

 na
[
  [
    'name',
    'hr',
    'avg'
  ],
  [
    'Mark McGwire',
    65,
    '0.278'
  ],
  [
    'Sammy Sosa',
    63,
    '0.288'
  ]
]

py-pyyaml-py

 na
[['name', 'hr', 'avg'], ['Mark McGwire', 65, 0.278], ['Sammy Sosa', 63, 0.288]]

py-ruamel-py

 na
[['name', 'hr', 'avg'], ['Mark McGwire', 65, 0.278], ['Sammy Sosa', 63, 0.288]]