YAML Framework 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



cpp-event

 ok

java-event

 ok

java-json

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

js-yaml-json

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

libyaml-event

 ok

luajit-json

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

nimyaml-event

 ok

perl5-pegex-event

 ok

perl5-pm-json

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

perl5-pm-pl

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

perl5-pp-event

 ok

perl5-pp-json

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

perl5-pp-pl

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

perl5-syck-json

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

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' 

perl5-tiny-pl

 error
YAML::Tiny does not support a feature in line '&SS Sammy Sosa' 

perl5-xs-json

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

perl5-xs-pl

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

pyyaml-event

 ok

ruamel-event

 ok

ruby-json

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