# YAML Test Matrix

--- &test-JTV5
  Title: Block Mapping with Multiline Scalars
  Tags: [ explicit-key, mapping, scalar ]

YAML

? a
  true
: null
  d
? e
  42

Expected Events

+STR
+DOC
+MAP
=VAL :a true
=VAL :null d
=VAL :e 42
=VAL :
-MAP
-DOC
-STR

Expected JSON

{
"a true": "null d",
"e 42": null
}

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

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

lua-lyaml-json

 json_diff
{
  "a true": "null d",
  "e 42": {}
}

perl-syck-json

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

perl-syck-perl

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

perl-yaml-json

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

perl-yaml-perl

 error
YAML Error: Inconsistent indentation level
   Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 804.

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 +VAL |
   1    2    2    2 =TEXT|a
   1    3    3    3 =FOLD|\x0a
   2    0    4    4 =DENT|.
   2    1    5    5 =WSPC|.
   2    2    6    6 =TEXT|true
   2    6   10   10 -VAL |
   2    6   10   10 -NODE|
   2    6   10   10 =EOL |\x0a
   3    0   11   11 =SYNX|:
   3    1   12   12 =WSPC|.
   3    2   13   13 +NODE|
   3    2   13   13 +VAL |
   3    2   13   13 =TEXT|null
   3    6   17   17 =FOLD|\x0a
   4    0   18   18 =DENT|.
   4    1   19   19 =WSPC|.
   4    2   20   20 =TEXT|d
   4    3   21   21 -VAL |
   4    3   21   21 -NODE|
   4    3   21   21 =EOL |\x0a
   5    0   22   22 -PAIR|
   5    0   22   22 +PAIR|
   5    0   22   22 =SYNX|?
   5    1   23   23 =WSPC|.
   5    2   24   24 +NODE|
   5    2   24   24 +VAL |
   5    2   24   24 =TEXT|e
   5    3   25   25 =FOLD|\x0a
   6    0   26   26 =DENT|.
   6    1   27   27 =WSPC|.
   6    2   28   28 =TEXT|42
   6    4   30   30 -VAL |
   6    4   30   30 -NODE|
   6    4   30   30 =EOL |\x0a
   7    0   31   31 +NODE|
   7    0   31   31 +VAL |
   7    0   31   31 -VAL |
   7    0   31   31 -NODE|
   7    0   31   31 -PAIR|
   7    0   31   31 -MAP |
   7    0   31   31 -NODE|
   7    0   31   31 -DOC |

perl-pp-perl

 na
{
  'a true' => 'null d',
  'e 42' => undef
}

perl-pplibyaml-perl

 na
{
  'a true' => 'null d',
  'e 42' => undef
}

perl-xs-perl

 na
{
  'a true' => 'null d',
  'e 42' => undef
}

py-pyyaml-py

 na
{'a true': 'null d', 'e 42': None}

py-ruamel-py

 na
{'a true': 'null d', 'e 42': None}

perl-tiny-json

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

perl-tiny-perl

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