# YAML Test Matrix

--- &test-L94M
  Title: Tags in Explicit Mapping
  Tags: [ explicit-key, mapping, tag ]

YAML

? !!str a
: !!int 47
? c
: !!str d

Expected Events

+STR
+DOC
+MAP
=VAL <tag:yaml.org,2002:str> :a
=VAL <tag:yaml.org,2002:int> :47
=VAL :c
=VAL <tag:yaml.org,2002:str> :d
-MAP
-DOC
-STR

Expected JSON

{
"a": 47,
"c": "d"
}

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-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

dotnet-yamldotnet-json

 json_ok

go-yaml-json

 json_ok

hs-hsyaml-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

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +MAP |
   1    0    0    0 +PAIR|
   1    0    0    0 =SYNX|?
   1    1    1    1 =WSPC|.
   1    2    2    2 +NODE|
   1    2    2    2 +PROP|
   1    2    2    2 +TAG |
   1    2    2    2 +HAND|
   1    2    2    2 =SYNX|!
   1    3    3    3 =SYNX|!
   1    4    4    4 -HAND|
   1    4    4    4 =META|str
   1    7    7    7 -TAG |
   1    7    7    7 -PROP|
   1    7    7    7 =WSPC|.
   1    8    8    8 +VAL |
   1    8    8    8 =TEXT|a
   1    9    9    9 -VAL |
   1    9    9    9 -NODE|
   1    9    9    9 =EOL |\x0a
   2    0   10   10 =SYNX|:
   2    1   11   11 =WSPC|.
   2    2   12   12 +NODE|
   2    2   12   12 +PROP|
   2    2   12   12 +TAG |
   2    2   12   12 +HAND|
   2    2   12   12 =SYNX|!
   2    3   13   13 =SYNX|!
   2    4   14   14 -HAND|
   2    4   14   14 =META|int
   2    7   17   17 -TAG |
   2    7   17   17 -PROP|
   2    7   17   17 =WSPC|.
   2    8   18   18 +VAL |
   2    8   18   18 =TEXT|47
   2   10   20   20 -VAL |
   2   10   20   20 -NODE|
   2   10   20   20 =EOL |\x0a
   3    0   21   21 -PAIR|
   3    0   21   21 +PAIR|
   3    0   21   21 =SYNX|?
   3    1   22   22 =WSPC|.
   3    2   23   23 +NODE|
   3    2   23   23 +VAL |
   3    2   23   23 =TEXT|c
   3    3   24   24 -VAL |
   3    3   24   24 -NODE|
   3    3   24   24 =EOL |\x0a
   4    0   25   25 =SYNX|:
   4    1   26   26 =WSPC|.
   4    2   27   27 +NODE|
   4    2   27   27 +PROP|
   4    2   27   27 +TAG |
   4    2   27   27 +HAND|
   4    2   27   27 =SYNX|!
   4    3   28   28 =SYNX|!
   4    4   29   29 -HAND|
   4    4   29   29 =META|str
   4    7   32   32 -TAG |
   4    7   32   32 -PROP|
   4    7   32   32 =WSPC|.
   4    8   33   33 +VAL |
   4    8   33   33 =TEXT|d
   4    9   34   34 -VAL |
   4    9   34   34 -NODE|
   4    9   34   34 =EOL |\x0a
   5    0   35   35 -PAIR|
   5    0   35   35 -MAP |
   5    0   35   35 -NODE|
   5    0   35   35 -DOC |

perl-pp-perl

 na
{
  'a' => 47,
  'c' => 'd'
}

perl-pplibyaml-perl

 na
{
  'a' => 47,
  'c' => 'd'
}

perl-syck-perl

 na
{
  'a' => 47,
  'c' => 'd'
}

perl-xs-perl

 na
{
  'a' => 47,
  'c' => 'd'
}

perl-yaml-perl

 na
{
  'a' => 47,
  'c' => 'd'
}

py-pyyaml-py

 na
{'a': 47, 'c': 'd'}

py-ruamel-py

 na
{'a': 47, 'c': 'd'}

perl-tiny-json

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

perl-tiny-perl

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