# YAML Test Matrix

--- &test-6JWB
  Title: Tags for Block Objects
  Tags: [ mapping, sequence, 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"
}
]
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-syck-json

 json_ok

perl-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

dotnet-yamldotnet-json

 error
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 1, Col: 6, Idx: 5) - (Line: 2, Col: 3, Idx: 13): Encountered an unresolved tag 'tag:yaml.org,2002:seq'
   at YamlDotNet.Serialization.NodeTypeResolvers.PreventUnknownTagsNodeTypeResolver.YamlDotNet.Serialization.INodeTypeResolver.Resolve(NodeEvent nodeEvent, Type& currentType)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.GetTypeFromEvent(NodeEvent nodeEvent, Type currentType)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
   at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.DeserializeHelper(Type tKey, Type tValue, IParser parser, Func`3 nestedObjectDeserializer, IDictionary result)
   at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input)
   at Program.Main(String[] commandLineArguments)
Aborted (core dumped)

perl-pp-perl

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

perl-pplibyaml-perl

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

perl-syck-perl

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

perl-xs-perl

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

perl-yaml-perl

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

py-pyyaml-py

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

py-ruamel-py

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

perl-tiny-json

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

perl-tiny-perl

 ni
YAML::Tiny does not support a feature in line '!!seq' at /yaml/bin/perl-tiny-perl line 15.