# YAML Test Matrix

--- &test-6JWB
  Title: Tags for Block Objects
  Tags: [ tag ]

YAML

foo: !!seq
  - !!str a
  - !!map
    key: !!str value

Expected Events

+STR
+DOC
+MAP
=VAL :foo
+SEQ <tag:yaml.org,2002:seq>
=VAL <tag:yaml.org,2002:str> :a
+MAP <tag:yaml.org,2002:map>
=VAL :key
=VAL <tag:yaml.org,2002:str> :value
-MAP
-SEQ
-MAP
-DOC
-STR

Expected JSON

{
"foo": [
"a",
{
"key": "value"
}
]
}

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

libyaml-event

 ok

nimyaml-event

 ok

perl5-pegex-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

hs-yaml-json

 json_ok

java-json

 json_ok

js-json

 json_ok

js-yaml-json

 json_ok

luajit-json

 json_ok

perl5-pm-json

 json_ok

perl5-pp-json

 json_ok

perl5-xs-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

ruby-json

 json_ok

perl5-syck-json

 json_diff
{
  "foo": null
}

perl5-tiny-json

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

perl5-tiny-pl

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

perl5-pm-pl

 na
{
  'foo' => [
           'a',
           {
             'key' => 'value'
           }
         ]
}

perl5-pp-pl

 na
{
  'foo' => [
           'a',
           {
             'key' => 'value'
           }
         ]
}

perl5-syck-pl

 na
{
  'foo' => bless( [
                  'a',
                  bless( {
                           'key' => 'value'
                         }, 'map' )
                ], 'seq' )
}

perl5-xs-pl

 na
{
  'foo' => [
             'a',
             {
               'key' => 'value'
             }
           ]
}

pyyaml-py

 na
{'foo': ['a', {'key': 'value'}]}

ruamel-py

 na
{'foo': ['a', {'key': 'value'}]}