# YAML Test Matrix

--- &test-S4JQ
  Title: Spec Example 6.28. Non-Specific Tags
  Tags: [ spec, tag ]

YAML

# Assuming conventional resolution:
- "12"
- 12
- ! 12

Expected Events

+STR
+DOC
+SEQ
=VAL "12
=VAL :12
=VAL <!> :12
-SEQ
-DOC
-STR

Expected JSON

[
"12",
12,
"12"
]

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

go-yaml-json

 json_ok

hs-hsyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-xs-json

 json_ok

cpp-yamlcpp-event

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

lua-lyaml-json

 json_diff
[
  "12",
  12,
  12
]

perl-syck-json

 json_diff
[
  "12",
  12,
  12
]

perl-yaml-json

 json_diff
[
  "12",
  12,
  12
]

py-pyyaml-json

 json_diff
[
  "12",
  12,
  12
]

py-ruamel-json

 json_diff
[
  "12",
  12,
  12
]

ruby-psych-json

 json_diff
[
  "12",
  12,
  12
]

dotnet-yamldotnet-json

 error
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 4, Col: 3, Idx: 50) - (Line: 4, Col: 7, Idx: 54): 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.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
   at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.DeserializeHelper(Type tItem, IParser parser, Func`3 nestedObjectDeserializer, IList result, Boolean canUpdate)
   at YamlDotNet.Serialization.NodeDeserializers.CollectionNodeDeserializer.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)

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +COMM|
   1    0    0    0 =SYNX|#
   1    1    1    1 =META|.Assuming.conventional.resolution:
   1   35   35   35 -COMM|
   1   35   35   35 =EOL |\x0a
   2    0   36   36 +DOC |
   2    0   36   36 +NODE|
   2    0   36   36 +SEQ |
   2    0   36   36 =SYNX|-
   2    1   37   37 =WSPC|.
   2    2   38   38 +NODE|
   2    2   38   38 +VAL |
   2    2   38   38 =SYNX|"
   2    3   39   39 =TEXT|12
   2    5   41   41 =SYNX|"
   2    6   42   42 -VAL |
   2    6   42   42 -NODE|
   2    6   42   42 =EOL |\x0a
   3    0   43   43 =SYNX|-
   3    1   44   44 =WSPC|.
   3    2   45   45 +NODE|
   3    2   45   45 +VAL |
   3    2   45   45 =TEXT|12
   3    4   47   47 -VAL |
   3    4   47   47 -NODE|
   3    4   47   47 =EOL |\x0a
   4    0   48   48 =SYNX|-
   4    1   49   49 =WSPC|.
   4    2   50   50 +NODE|
   4    2   50   50 +PROP|
   4    2   50   50 +TAG |
   4    2   50   50 =SYNX|!
   4    3   51   51 -TAG |
   4    3   51   51 -PROP|
   4    3   51   51 =WSPC|.
   4    4   52   52 +VAL |
   4    4   52   52 =TEXT|12
   4    6   54   54 -VAL |
   4    6   54   54 -NODE|
   4    6   54   54 =EOL |\x0a
   5    0   55   55 -SEQ |
   5    0   55   55 -NODE|
   5    0   55   55 -DOC |

perl-pp-perl

 na
[
  '12',
  12,
  '12'
]

perl-pplibyaml-perl

 na
[
  '12',
  12,
  '12'
]

perl-syck-perl

 na
[
  '12',
  12,
  12
]

perl-xs-perl

 na
[
  '12',
  12,
  '12'
]

perl-yaml-perl

 na
[
  '12',
  12,
  12
]

py-pyyaml-py

 na
['12', 12, 12]

py-ruamel-py

 na
['12', 12, 12]

perl-tiny-json

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

perl-tiny-perl

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