# 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"
]
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

libyaml-event

 ok

nimyaml-event

 ok

perl5-pegex-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

hs-yaml-json

 json_ok

java-json

 json_ok

js-json

 json_ok

js-yaml-json

 json_ok

luajit-json

 json_ok

perl5-pm-json

 json_ok

perl5-pp-json

 json_ok

perl5-syck-json

 json_ok

perl5-tiny-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

perl5-pm-pl

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

perl5-pp-pl

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

perl5-syck-pl

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

perl5-tiny-pl

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

perl5-xs-pl

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

pyyaml-py

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

ruamel-py

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