YAML Framework Matrix

Test #9U5K - Spec Example 2.12. Compact Nested Mapping

YAML

---
# Products purchased
- item    : Super Hoop
  quantity: 1
- item    : Basketball
  quantity: 4
- item    : Big Shoes
  quantity: 1

Expected Events

+STR
+DOC ---
+SEQ
+MAP
=VAL :item
=VAL :Super Hoop
=VAL :quantity
=VAL :1
-MAP
+MAP
=VAL :item
=VAL :Basketball
=VAL :quantity
=VAL :4
-MAP
+MAP
=VAL :item
=VAL :Big Shoes
=VAL :quantity
=VAL :1
-MAP
-SEQ
-DOC
-STR

Expected JSON

[
{
"item" : "Super Hoop",
"quantity" : 1
},
{
"item" : "Basketball",
"quantity" : 4
},
{
"item" : "Big Shoes",
"quantity" : 1
}
]

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

 diff
Got Events:
+STR
+DOC ---
+SEQ
=VAL :item
-SEQ
-DOC
+DOC
+MAP
=VAL :
=VAL :Super Hoop
-MAP
-DOC
+DOC
+MAP
=VAL :quantity
=VAL :1
-MAP
-DOC
+DOC
+SEQ
=VAL :item
-SEQ
-DOC
+DOC
+MAP
=VAL :
=VAL :Basketball
-MAP
-DOC
+DOC
+MAP
=VAL :quantity
=VAL :4
-MAP
-DOC
+DOC
+SEQ
=VAL :item
-SEQ
-DOC
+DOC
+MAP
=VAL :
=VAL :Big Shoes
-MAP
-DOC
+DOC
+MAP
=VAL :quantity
=VAL :1
-MAP
-DOC
-STR

perl5-pm-json

 json_ok

perl5-pm-pl

 n/a
[
  {
    'item' => 'Super Hoop',
    'quantity' => 1
  },
  {
    'item' => 'Basketball',
    'quantity' => 4
  },
  {
    'item' => 'Big Shoes',
    'quantity' => 1
  }
]

perl5-pp-event

 ok

perl5-pp-json

 json_ok

perl5-pp-pl

 n/a
[
  {
    'item' => 'Super Hoop',
    'quantity' => 1
  },
  {
    'item' => 'Basketball',
    'quantity' => 4
  },
  {
    'item' => 'Big Shoes',
    'quantity' => 1
  }
]

perl5-syck-json

 json_ok

perl5-syck-pl

 n/a
[
  {
    'item' => 'Super Hoop',
    'quantity' => 1
  },
  {
    'item' => 'Basketball',
    'quantity' => 4
  },
  {
    'item' => 'Big Shoes',
    'quantity' => 1
  }
]

perl5-tiny-json

 json_diff
[
   {
      "item" : "Super Hoop",
      "quantity" : "1"
   },
   {
      "item" : "Basketball",
      "quantity" : "4"
   },
   {
      "item" : "Big Shoes",
      "quantity" : "1"
   }
]

perl5-tiny-pl

 n/a
[
  {
    'item' => 'Super Hoop',
    'quantity' => '1'
  },
  {
    'item' => 'Basketball',
    'quantity' => '4'
  },
  {
    'item' => 'Big Shoes',
    'quantity' => '1'
  }
]

perl5-xs-json

 json_ok

perl5-xs-pl

 n/a
[
  {
    'item' => 'Super Hoop',
    'quantity' => 1
  },
  {
    'item' => 'Basketball',
    'quantity' => 4
  },
  {
    'item' => 'Big Shoes',
    'quantity' => 1
  }
]

pyyaml-event

 ok

ruamel-event

 ok

ruby-json

 json_ok