YAML Framework Matrix

Test #PW8X - Anchors on Empty Scalars

YAML

- &a
- a
-
  &a : a
  b: &b
  &c : &a
-
  ? &d
  ? &e
  : &a

Expected Events

+STR
+DOC
+SEQ
=VAL &a :
=VAL :a
+MAP
=VAL &a :
=VAL :a
=VAL :b
=VAL &b :
=VAL &c :
=VAL &a :
-MAP
+MAP
=VAL &d :
=VAL :
=VAL &e :
=VAL &a :
-MAP
-SEQ
-DOC
-STR

Expected JSON



cpp-event

 ok

java-event

 ok

java-json

 n/a
[
  null,
  "a",
  {},
  {}
]

js-yaml-json

 error
YAMLException: bad indentation of a sequence entry at line 4, column 6:
      &a : a
         ^
    at generateError (/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readBlockSequence (/node_modules/js-yaml/lib/js-yaml/loader.js:935:7)
    at composeNode (/node_modules/js-yaml/lib/js-yaml/loader.js:1331:12)
    at readDocument (/node_modules/js-yaml/lib/js-yaml/loader.js:1492:3)
    at loadDocuments (/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at Object.loadAll (/node_modules/js-yaml/lib/js-yaml/loader.js:1556: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
Maximum parsing rules reached (1000)

perl5-pm-json

 error
Use of uninitialized value $key in string at /lib/perl5/YAML/Loader.pm line 331, <> line 1.
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 9
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 350.

perl5-pm-pl

 error
Use of uninitialized value $key in string at /lib/perl5/YAML/Loader.pm line 331, <> line 1.
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 9
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 350.

perl5-pp-event

 ok

perl5-pp-json

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

perl5-pp-pl

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

perl5-syck-json

 error
Syck parser (line 4, column 6): syntax error at /lib/perl5/x86_64-linux-gnu-thread-multi/YAML/Syck.pm line 75, <> line 1.

perl5-syck-pl

 error
Syck parser (line 4, column 6): syntax error at /lib/perl5/x86_64-linux-gnu-thread-multi/YAML/Syck.pm line 75, <> line 1.

perl5-tiny-json

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

perl5-tiny-pl

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

perl5-xs-json

 n/a
[null,"a",{"":null,"b":null},{"":null}]
Use of uninitialized value in subroutine entry at /bin/perl5-xs-json line 14, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-json line 14, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-json line 14, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-json line 14, <> line 1.

perl5-xs-pl

 n/a
[
  undef,
  'a',
  {
    '' => undef,
    'b' => undef
  },
  {
    '' => undef
  }
]
Use of uninitialized value in subroutine entry at /bin/perl5-xs-pl line 13, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-pl line 13, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-pl line 13, <> line 1.
Use of uninitialized value in subroutine entry at /bin/perl5-xs-pl line 13, <> line 1.

pyyaml-event

 ok

ruamel-event

 ok

ruby-json

 n/a
[null,"a",{"":null,"b":null},{"":null}]