YAML Test Matrix

Test #7BUB - Spec Example 2.10. Node for “Sammy Sosa” appears twice in this document

YAML

---
hr:
  - Mark McGwire
  # Following node labeled SS
  - &SS Sammy Sosa
rbi:
  - *SS # Subsequent occurrence
  - Ken Griffey

Expected Events

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

Expected JSON

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

cpp-event

 ok

java-event

 ok

java-json

 json_ok

js-yaml-json

 json_ok

libyaml-event

 ok

luajit-json

 json_ok

nimyaml-event

 ok

perl5-pegex-event

 ok

perl5-pm-json

 json_ok

perl5-pm-pl

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

perl5-pp-event

 ok

perl5-pp-json

 json_ok

perl5-pp-pl

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

perl5-syck-json

 json_ok

perl5-syck-pl

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

perl5-tiny-json

 error
YAML::Tiny does not support a feature in line '&SS Sammy Sosa' at /bin/perl5-tiny-json line 14.

perl5-tiny-pl

 error
YAML::Tiny does not support a feature in line '&SS Sammy Sosa' at /bin/perl5-tiny-pl line 13.

perl5-xs-json

 json_ok

perl5-xs-pl

 n/a
{
  'hr' => [
            'Mark McGwire',
            'Sammy Sosa'
          ],
  'rbi' => [
             ${\$VAR1->{'hr'}[1]},
             'Ken Griffey'
           ]
}

pyyaml-event

 ok

pyyaml-json

 json_ok

pyyaml-py

 n/a
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}

ruamel-event

 ok

ruamel-json

 json_ok

ruamel-py

 n/a
{'hr': ['Mark McGwire', 'Sammy Sosa'], 'rbi': ['Sammy Sosa', 'Ken Griffey']}

ruby-json

 json_ok