# YAML Test Matrix

--- &test-229Q
  Title: Spec Example 2.4. Sequence of Mappings
  Tags: [ mapping, sequence, spec ]

YAML

-
  name: Mark McGwire
  hr:   65
  avg:  0.278
-
  name: Sammy Sosa
  hr:   63
  avg:  0.288

Expected Events

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

Expected JSON

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

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-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
[
  {
    "avg": "0.278",
    "hr": "65",
    "name": "Mark McGwire"
  },
  {
    "avg": "0.288",
    "hr": "63",
    "name": "Sammy Sosa"
  }
]

perl-tiny-json

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

perl-pp-perl

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

perl-pplibyaml-perl

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

perl-syck-perl

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

perl-tiny-perl

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

perl-xs-perl

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

perl-yaml-perl

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

py-pyyaml-py

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

py-ruamel-py

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