# YAML Test Matrix

--- &test-8KB6
  Title: Multiline plain flow mapping key without value
  Tags: [ flow, mapping ]

YAML

---
- { single line, a: b}
- { multi
  line, a: b}

Expected Events

+STR
+DOC ---
+SEQ
+MAP {}
=VAL :single line
=VAL :
=VAL :a
=VAL :b
-MAP
+MAP {}
=VAL :multi line
=VAL :
=VAL :a
=VAL :b
-MAP
-SEQ
-DOC
-STR

Expected JSON

[
{
"a": "b",
"single line": null
},
{
"a": "b",
"multi line": null
}
]

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

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": "b",
    "single line": {}
  },
  {
    "a": "b",
    "multi line": {}
  }
]

cpp-yamlcpp-event

 error
+STR
+DOC
+SEQ
+MAP {}
=VAL :single line
=VAL :
=VAL :a
=VAL :b
-MAP
+MAP {}
=VAL :
=VAL :
Exception:
yaml-cpp: error at line 3, column 5: end of map flow not found

perl-syck-json

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

perl-yaml-json

 error
YAML Error: Can't parse inline map
   Code: YAML_PARSE_ERR_INLINE_MAP
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 522.

perl-yaml-perl

 error
YAML Error: Can't parse inline map
   Code: YAML_PARSE_ERR_INLINE_MAP
   Line: 3
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 522.

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 =HEAD|---
   1    3    3    3 +NODE|
   1    3    3    3 =EOL |\x0a
   2    0    4    4 +SEQ |
   2    0    4    4 =SYNX|-
   2    1    5    5 =WSPC|.
   2    2    6    6 +NODE|
   2    2    6    6 +MAP |
   2    2    6    6 =SYNX|{
   2    3    7    7 =WSPC|.
   2    4    8    8 +PAIR|
   2    4    8    8 +NODE|
   2    4    8    8 +VAL |
   2    4    8    8 =TEXT|single.line
   2   15   19   19 -VAL |
   2   15   19   19 -NODE|
   2   15   19   19 +NODE|
   2   15   19   19 +VAL |
   2   15   19   19 -VAL |
   2   15   19   19 -NODE|
   2   15   19   19 -PAIR|
   2   15   19   19 =SYNX|,
   2   16   20   20 =WSPC|.
   2   17   21   21 +PAIR|
   2   17   21   21 +NODE|
   2   17   21   21 +VAL |
   2   17   21   21 =TEXT|a
   2   18   22   22 -VAL |
   2   18   22   22 -NODE|
   2   18   22   22 =SYNX|:
   2   19   23   23 =WSPC|.
   2   20   24   24 +NODE|
   2   20   24   24 +VAL |
   2   20   24   24 =TEXT|b
   2   21   25   25 -VAL |
   2   21   25   25 -NODE|
   2   21   25   25 -PAIR|
   2   21   25   25 =SYNX|}
   2   22   26   26 -MAP |
   2   22   26   26 -NODE|
   2   22   26   26 =EOL |\x0a
   3    0   27   27 =SYNX|-
   3    1   28   28 =WSPC|.
   3    2   29   29 +NODE|
   3    2   29   29 +MAP |
   3    2   29   29 =SYNX|{
   3    3   30   30 =WSPC|.
   3    4   31   31 +PAIR|
   3    4   31   31 +NODE|
   3    4   31   31 +VAL |
   3    4   31   31 =TEXT|multi
   3    9   36   36 =FOLD|\x0a
   4    0   37   37 =DENT|.
   4    1   38   38 =WSPC|.
   4    2   39   39 =TEXT|line
   4    6   43   43 -VAL |
   4    6   43   43 -NODE|
   4    6   43   43 +NODE|
   4    6   43   43 +VAL |
   4    6   43   43 -VAL |
   4    6   43   43 -NODE|
   4    6   43   43 -PAIR|
   4    6   43   43 =SYNX|,
   4    7   44   44 =WSPC|.
   4    8   45   45 +PAIR|
   4    8   45   45 +NODE|
   4    8   45   45 +VAL |
   4    8   45   45 =TEXT|a
   4    9   46   46 -VAL |
   4    9   46   46 -NODE|
   4    9   46   46 =SYNX|:
   4   10   47   47 =WSPC|.
   4   11   48   48 +NODE|
   4   11   48   48 +VAL |
   4   11   48   48 =TEXT|b
   4   12   49   49 -VAL |
   4   12   49   49 -NODE|
   4   12   49   49 -PAIR|
   4   12   49   49 =SYNX|}
   4   13   50   50 -MAP |
   4   13   50   50 -NODE|
   4   13   50   50 =EOL |\x0a
   5    0   51   51 -SEQ |
   5    0   51   51 -NODE|
   5    0   51   51 -DOC |

perl-pp-perl

 na
[
  {
    'a' => 'b',
    'single line' => undef
  },
  {
    'a' => 'b',
    'multi line' => undef
  }
]

perl-pplibyaml-perl

 na
[
  {
    'a' => 'b',
    'single line' => undef
  },
  {
    'a' => 'b',
    'multi line' => undef
  }
]

perl-xs-perl

 na
[
  {
    'a' => 'b',
    'single line' => undef
  },
  {
    'a' => 'b',
    'multi line' => undef
  }
]

py-pyyaml-py

 na
[{'a': 'b', 'single line': None}, {'a': 'b', 'multi line': None}]

py-ruamel-py

 na
[{'a': 'b', 'single line': None}, {'a': 'b', 'multi line': None}]

perl-tiny-json

 ni
YAML::Tiny found illegal characters in plain scalar: '{ single line, a: b}' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny found illegal characters in plain scalar: '{ single line, a: b}' at /yaml/bin/perl-tiny-perl line 15.