YAML Framework Matrix

Test #E76Z - Aliases in Implicit Block Mapping

YAML

&a a: &b b
*a : *b

Expected Events

+STR
+DOC
+MAP
=VAL &a :a
=VAL &b :b
=ALI *a
=ALI *b
-MAP
-DOC
-STR

Expected JSON



cpp-event

 ok

java-event

 ok

java-json

 n/a
{
  "a": "b"
}

js-yaml-json

 error
YAMLException: end of the stream or a document separator is expected at line 1, column 5:
    &a a: &b b
        ^
    at generateError (/node_modules/js-yaml/lib/js-yaml/loader.js:162:10)
    at throwError (/node_modules/js-yaml/lib/js-yaml/loader.js:168:9)
    at readDocument (/node_modules/js-yaml/lib/js-yaml/loader.js:1513:5)
    at loadDocuments (/node_modules/js-yaml/lib/js-yaml/loader.js:1549:5)
    at Object.loadAll (/node_modules/js-yaml/lib/js-yaml/loader.js:1557:19)
    at Object.<anonymous> (/bin/js-yaml-json:6:6)
    at Object.<anonymous> (/bin/js-yaml-json:3:1)
    at Module._compile (module.js:410:26)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:173:23)
    at compileScript (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:224:29)
    at compilePath (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:174:14)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:98:20)
    at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/coffee:7:41)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

libyaml-event

 ok

luajit-json

 n/a
{"a":"b"}

nimyaml-event

 ok

perl5-pegex-event

 error
Error parsing Pegex document:
  msg:      Parse document failed for some reason
  line:     2
  column:   1
  context:  *a : *b\n
            ^
  position: 11 (0 pre-lookahead)
 

perl5-pm-json

 n/a
{"a":"b"}

perl5-pm-pl

 n/a
{
  'a' => 'b'
}

perl5-pp-event

 ok

perl5-pp-json

 n/a
Use of uninitialized value $value in hash element at /lib/perl5/YAML/PP/Loader.pm line 117, <> line 1.
Use of uninitialized value $value in hash element at /lib/perl5/YAML/PP/Loader.pm line 118, <> line 1.
{
   "" : null,
   "a" : "b"
}

perl5-pp-pl

 n/a
Use of uninitialized value $value in hash element at /lib/perl5/YAML/PP/Loader.pm line 117, <> line 1.
Use of uninitialized value $value in hash element at /lib/perl5/YAML/PP/Loader.pm line 118, <> line 1.
{
  '' => undef,
  'a' => 'b'
}

perl5-syck-json

 n/a
{"YAML::Syck::BadAlias=HASH(0x1ebb670)":"b","a":"b"}

perl5-syck-pl

 n/a
{
  'YAML::Syck::BadAlias=HASH(0x16f9d00)' => 'b',
  'a' => 'b'
}

perl5-tiny-json

 error
YAML::Tiny does not support a feature in line '&b b' 

perl5-tiny-pl

 error
YAML::Tiny does not support a feature in line '&b b' 

perl5-xs-json

 n/a
{"a":"b"}

perl5-xs-pl

 n/a
{
  'a' => 'b'
}

pyyaml-event

 ok

ruamel-event

 ok

ruby-json

 n/a
{"a":"b"}