YAML Framework Matrix

Test #M5DY - Spec Example 2.11. Mapping between Sequences

YAML

? - Detroit Tigers
  - Chicago cubs
:
  - 2001-07-23

? [ New York Yankees,
    Atlanta Braves ]
: [ 2001-07-02, 2001-08-12,
    2001-08-14 ]

Expected Events

+STR
+DOC
+MAP
+SEQ
=VAL :Detroit Tigers
=VAL :Chicago cubs
-SEQ
+SEQ
=VAL :2001-07-23
-SEQ
+SEQ
=VAL :New York Yankees
=VAL :Atlanta Braves
-SEQ
+SEQ
=VAL :2001-07-02
=VAL :2001-08-12
=VAL :2001-08-14
-SEQ
-MAP
-DOC
-STR

Expected JSON



cpp-event

 ok

java-event

 ok

java-json

 n/a
{
  "[Detroit Tigers, Chicago cubs]": [
    "Jul 23, 2001 12:00:00 AM"
  ],
  "[New York Yankees, Atlanta Braves]": [
    "Jul 2, 2001 12:00:00 AM",
    "Aug 12, 2001 12:00:00 AM",
    "Aug 14, 2001 12:00:00 AM"
  ]
}

js-yaml-json

 n/a
{
  "Detroit Tigers,Chicago cubs": [
    "2001-07-23T00:00:00.000Z"
  ],
  "New York Yankees,Atlanta Braves": [
    "2001-07-02T00:00:00.000Z",
    "2001-08-12T00:00:00.000Z",
    "2001-08-14T00:00:00.000Z"
  ]
}

libyaml-event

 ok

luajit-json

 error
luajit: /bin/luajit-json:6: Cannot serialise table: table key must be a number or string
stack traceback:
	[C]: in function 'encode'
	/bin/luajit-json:6: in main chunk
	[C]: at 0x004044a0

nimyaml-event

 ok

perl5-pegex-event

 error
Maximum parsing rules reached (1000)

perl5-pm-json

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 736.

perl5-pm-pl

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /lib/perl5/YAML/Loader.pm line 736.

perl5-pp-event

 error
+STR
+DOC
+MAP
+SEQ
=VAL :Detroit Tigers
=VAL :Chicago cubs
-SEQ
+SEQ
=VAL :2001-07-23
-SEQ
Not Implemented: Flow Style at /lib/perl5/YAML/PP/Parser.pm line 672, <> line 1.

perl5-pp-json

 error
Not Implemented: Flow Style at /lib/perl5/YAML/PP/Parser.pm line 672, <> line 1.

perl5-pp-pl

 error
Not Implemented: Flow Style at /lib/perl5/YAML/PP/Parser.pm line 672, <> line 1.

perl5-syck-json

 n/a
{"ARRAY(0x1e37628)":["2001-07-23"],"ARRAY(0x1e37ce8)":["2001-07-02","2001-08-12","2001-08-14"]}

perl5-syck-pl

 n/a
{
  'ARRAY(0x1fe0670)' => [
                          '2001-07-02',
                          '2001-08-12',
                          '2001-08-14'
                        ],
  'ARRAY(0x1fff440)' => [
                          '2001-07-23'
                        ]
}

perl5-tiny-json

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

perl5-tiny-pl

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

perl5-xs-json

 n/a
{"ARRAY(0x15f3658)":["2001-07-02","2001-08-12","2001-08-14"],"ARRAY(0x172dcb0)":["2001-07-23"]}

perl5-xs-pl

 n/a
{
  'ARRAY(0x1b01468)' => [
                          '2001-07-02',
                          '2001-08-12',
                          '2001-08-14'
                        ],
  'ARRAY(0x1b38080)' => [
                          '2001-07-23'
                        ]
}

pyyaml-event

 ok

ruamel-event

 ok

ruby-json

 n/a
{"[\"Detroit Tigers\", \"Chicago cubs\"]":["2001-07-23"],"[\"New York Yankees\", \"Atlanta Braves\"]":["2001-07-02","2001-08-12","2001-08-14"]}