# YAML Test Matrix

--- &test-UKK6:02
  Title: Syntax character edge cases
  Tags: [ edge, empty-key ]

YAML

!

Expected Events

+STR
+DOC
=VAL <!> :
-DOC
-STR

Expected JSON



c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

rust-yamlrust-event

 ok

cpp-yamlcpp-event

 diff
Minimal Events:
+STR
+DOC
=VAL <!> :
-DOC
-STR
Transformed Events:
+STR
+DOC
=VAL :
-DOC
-STR
Got Events:
+STR
+DOC
=VAL :
-DOC
-STR

nim-nimyaml-event

 error
+STR
+DOC
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(106) next
Error: unhandled exception: Unexpected token (expected block content): StreamEnd [YamlStreamError]

perl-syck-perl

 error
Syck parser (line 2, column 0): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.

perl-yaml-perl

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 1
   Document: 2
 at /perl5/lib/perl5/YAML/Loader.pm line 88.

c-libfyaml-json

 na
""

dotnet-yamldotnet-json

 na
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 1, Col: 1, Idx: 0) - (Line: 2, Col: 1, Idx: 2): Encountered an unresolved tag '!'
   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.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)

go-yaml-json

 na
""

hs-hsyaml-json

 na
""

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +PROP|
   1    0    0    0 +TAG |
   1    0    0    0 =SYNX|!
   1    1    1    1 -TAG |
   1    1    1    1 -PROP|
   1    1    1    1 +VAL |
   1    1    1    1 -VAL |
   1    1    1    1 -NODE|
   1    1    1    1 =EOL |\x0a
   2    0    2    2 -DOC |

js-jsyaml-json

 na
null

js-yaml-json

 na
""

lua-lyaml-json

 na
{}

perl-pp-json

 na
""

perl-pp-perl

 na
''

perl-pplibyaml-json

 na
""

perl-pplibyaml-perl

 na
''

perl-syck-json

 na
Syck parser (line 2, column 0): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.

perl-tiny-json

 na
YAML::Tiny failed to classify line '!' at /yaml/bin/perl-tiny-json line 12.

perl-xs-json

 na
""

perl-xs-perl

 na
''

perl-yaml-json

 na
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 1
   Document: 2
 at /perl5/lib/perl5/YAML/Loader.pm line 88.

py-pyyaml-json

 na
null

py-pyyaml-py

 na
None

py-ruamel-json

 na
null

py-ruamel-py

 na
None

ruby-psych-json

 na
null

perl-tiny-perl

 ni
YAML::Tiny failed to classify line '!' at /yaml/bin/perl-tiny-perl line 15.