# YAML Test Matrix

--- &test-PBJ2
  Title: Spec Example 2.3. Mapping Scalars to Sequences
  Tags: [ mapping, sequence, spec ]

YAML

american:
  - Boston Red Sox
  - Detroit Tigers
  - New York Yankees
national:
  - New York Mets
  - Chicago Cubs
  - Atlanta Braves

Expected Events

+STR
+DOC
+MAP
=VAL :american
+SEQ
=VAL :Boston Red Sox
=VAL :Detroit Tigers
=VAL :New York Yankees
-SEQ
=VAL :national
+SEQ
=VAL :New York Mets
=VAL :Chicago Cubs
=VAL :Atlanta Braves
-SEQ
-MAP
-DOC
-STR

Expected JSON

{
"american": [
"Boston Red Sox",
"Detroit Tigers",
"New York Yankees"
],
"national": [
"New York Mets",
"Chicago Cubs",
"Atlanta Braves"
]
}

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|american
   1    8    8    8 -VAL |
   1    8    8    8 -NODE|
   1    8    8    8 =SYNX|:
   1    9    9    9 +NODE|
   1    9    9    9 =EOL |\x0a
   2    0   10   10 +SEQ |
   2    0   10   10 =DENT|..
   2    2   12   12 =SYNX|-
   2    3   13   13 =WSPC|.
   2    4   14   14 +NODE|
   2    4   14   14 +VAL |
   2    4   14   14 =TEXT|Boston.Red.Sox
   2   18   28   28 -VAL |
   2   18   28   28 -NODE|
   2   18   28   28 =EOL |\x0a
   3    0   29   29 =DENT|..
   3    2   31   31 =SYNX|-
   3    3   32   32 =WSPC|.
   3    4   33   33 +NODE|
   3    4   33   33 +VAL |
   3    4   33   33 =TEXT|Detroit.Tigers
   3   18   47   47 -VAL |
   3   18   47   47 -NODE|
   3   18   47   47 =EOL |\x0a
   4    0   48   48 =DENT|..
   4    2   50   50 =SYNX|-
   4    3   51   51 =WSPC|.
   4    4   52   52 +NODE|
   4    4   52   52 +VAL |
   4    4   52   52 =TEXT|New.York.Yankees
   4   20   68   68 -VAL |
   4   20   68   68 -NODE|
   4   20   68   68 =EOL |\x0a
   5    0   69   69 -SEQ |
   5    0   69   69 -NODE|
   5    0   69   69 -PAIR|
   5    0   69   69 +PAIR|
   5    0   69   69 +NODE|
   5    0   69   69 +VAL |
   5    0   69   69 =TEXT|national
   5    8   77   77 -VAL |
   5    8   77   77 -NODE|
   5    8   77   77 =SYNX|:
   5    9   78   78 +NODE|
   5    9   78   78 =EOL |\x0a
   6    0   79   79 +SEQ |
   6    0   79   79 =DENT|..
   6    2   81   81 =SYNX|-
   6    3   82   82 =WSPC|.
   6    4   83   83 +NODE|
   6    4   83   83 +VAL |
   6    4   83   83 =TEXT|New.York.Mets
   6   17   96   96 -VAL |
   6   17   96   96 -NODE|
   6   17   96   96 =EOL |\x0a
   7    0   97   97 =DENT|..
   7    2   99   99 =SYNX|-
   7    3  100  100 =WSPC|.
   7    4  101  101 +NODE|
   7    4  101  101 +VAL |
   7    4  101  101 =TEXT|Chicago.Cubs
   7   16  113  113 -VAL |
   7   16  113  113 -NODE|
   7   16  113  113 =EOL |\x0a
   8    0  114  114 =DENT|..
   8    2  116  116 =SYNX|-
   8    3  117  117 =WSPC|.
   8    4  118  118 +NODE|
   8    4  118  118 +VAL |
   8    4  118  118 =TEXT|Atlanta.Braves
   8   18  132  132 -VAL |
   8   18  132  132 -NODE|
   8   18  132  132 =EOL |\x0a
   9    0  133  133 -SEQ |
   9    0  133  133 -NODE|
   9    0  133  133 -PAIR|
   9    0  133  133 -MAP |
   9    0  133  133 -NODE|
   9    0  133  133 -DOC |

perl-pp-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

perl-pplibyaml-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

perl-syck-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

perl-tiny-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

perl-xs-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

perl-yaml-perl

 na
{
  'american' => [
                  'Boston Red Sox',
                  'Detroit Tigers',
                  'New York Yankees'
                ],
  'national' => [
                  'New York Mets',
                  'Chicago Cubs',
                  'Atlanta Braves'
                ]
}

py-pyyaml-py

 na
{'american': ['Boston Red Sox', 'Detroit Tigers', 'New York Yankees'],
 'national': ['New York Mets', 'Chicago Cubs', 'Atlanta Braves']}

py-ruamel-py

 na
{'american': ['Boston Red Sox', 'Detroit Tigers', 'New York Yankees'],
 'national': ['New York Mets', 'Chicago Cubs', 'Atlanta Braves']}