# YAML Test Matrix

--- &test-4ABK
  Title: Flow Mapping Separate Values
  Tags: [ flow, mapping ]

YAML

{
unquoted : "separate",
http://foo.com,
omitted value:,
}

Expected Events

+STR
+DOC
+MAP {}
=VAL :unquoted
=VAL "separate
=VAL :http://foo.com
=VAL :
=VAL :omitted value
=VAL :
-MAP
-DOC
-STR

Expected JSON



c-libfyaml-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

rust-yamlrust-event

 ok

py-ruamel-event

 diff
Got Events:
+STR
+DOC
+MAP {}
=VAL :unquoted
=VAL "separate
=VAL :http://foo.com
=VAL :
=VAL :omitted value:
=VAL :
-MAP
-DOC
-STR

c-libyaml-event

 error
+STR
+DOC
+MAP {}
=VAL :unquoted
=VAL "separate
=VAL :http://foo.com
=VAL :
Parse error: found unexpected ':'

perl-pplibyaml-perl

 error
YAML::PP::LibYAML Error: The problem:

    found unexpected ':'

was found at , line: 4, column: 14
while scanning a plain scalar at line: 4, column: 1

perl-syck-perl

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

perl-xs-perl

 error
YAML::XS::Load Error: The problem:

    found unexpected ':'

was found at document: 1, line: 4, column: 14
while scanning a plain scalar at line: 4, column: 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
{
  "unquoted": "separate",
  "http://foo.com": null,
  "omitted value": null
}

dotnet-yamldotnet-json

 na
{"unquoted": "separate", "http://foo.com": null, "omitted value": null}

go-yaml-json

 na
{"http://foo.com":null,"omitted value:":null,"unquoted":"separate"}

hs-hsyaml-json

 na
{"http://foo.com":null,"omitted value":null,"unquoted":"separate"}

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 =SYNX|{
   1    1    1    1 =EOL |\x0a
   2    0    2    2 +PAIR|
   2    0    2    2 +NODE|
   2    0    2    2 +VAL |
   2    0    2    2 =TEXT|unquoted
   2    8   10   10 -VAL |
   2    8   10   10 -NODE|
   2    8   10   10 =WSPC|.
   2    9   11   11 =SYNX|:
   2   10   12   12 =WSPC|.
   2   11   13   13 +NODE|
   2   11   13   13 +VAL |
   2   11   13   13 =SYNX|"
   2   12   14   14 =TEXT|separate
   2   20   22   22 =SYNX|"
   2   21   23   23 -VAL |
   2   21   23   23 -NODE|
   2   21   23   23 -PAIR|
   2   21   23   23 =SYNX|,
   2   22   24   24 =EOL |\x0a
   3    0   25   25 +PAIR|
   3    0   25   25 +NODE|
   3    0   25   25 +VAL |
   3    0   25   25 =TEXT|http://foo.com
   3   14   39   39 -VAL |
   3   14   39   39 -NODE|
   3   14   39   39 +NODE|
   3   14   39   39 +VAL |
   3   14   39   39 -VAL |
   3   14   39   39 -NODE|
   3   14   39   39 -PAIR|
   3   14   39   39 =SYNX|,
   3   15   40   40 =EOL |\x0a
   4    0   41   41 +PAIR|
   4    0   41   41 +NODE|
   4    0   41   41 +VAL |
   4    0   41   41 =TEXT|omitted.value:
   4   14   55   55 -VAL |
   4   14   55   55 -NODE|
   4   14   55   55 +NODE|
   4   14   55   55 +VAL |
   4   14   55   55 -VAL |
   4   14   55   55 -NODE|
   4   14   55   55 -PAIR|
   4   14   55   55 =SYNX|,
   4   15   56   56 =EOL |\x0a
   5    0   57   57 =SYNX|}
   5    1   58   58 -MAP |
   5    1   58   58 -NODE|
   5    1   58   58 =EOL |\x0a
   6    0   59   59 -DOC |

js-jsyaml-json

 na
{"unquoted":"separate","http://foo.com":null,"omitted value":null}

js-yaml-json

 na
{
  "unquoted": "separate",
  "http://foo.com": null,
  "omitted value": null
}

lua-lyaml-json

 na
luajit: 3:15: found unexpected ':'
stack traceback:
	[C]: in function 'error'
	/usr/local/share/lua/5.1/lyaml/init.lua:306: in function 'error'
	/usr/local/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
	/usr/local/share/lua/5.1/lyaml/init.lua:443: in function 'load_node'
	/usr/local/share/lua/5.1/lyaml/init.lua:340: in function 'load_node'
	/usr/local/share/lua/5.1/lyaml/init.lua:497: in function 'load'
	/yaml/bin/lua-lyaml-json:6: in main chunk
	[C]: at 0x557df1afbed0

perl-pp-json

 na
{
   "http://foo.com" : null,
   "omitted value" : null,
   "unquoted" : "separate"
}

perl-pp-perl

 na
{
  'http://foo.com' => undef,
  'omitted value' => undef,
  'unquoted' => 'separate'
}

perl-pplibyaml-json

 na
YAML::PP::LibYAML Error: The problem:

    found unexpected ':'

was found at , line: 4, column: 14
while scanning a plain scalar at line: 4, column: 1

perl-syck-json

 na
Syck parser (line 5, column 1): 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
YAML::XS::Load Error: The problem:

    found unexpected ':'

was found at document: 1, line: 4, column: 14
while scanning a plain scalar at line: 4, column: 1

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
{
  "http://foo.com": null,
  "omitted value": null,
  "unquoted": "separate"
}

py-pyyaml-py

 na
{'http://foo.com': None, 'omitted value': None, 'unquoted': 'separate'}

py-ruamel-json

 na
{
  "http://foo.com": null,
  "omitted value:": null,
  "unquoted": "separate"
}

py-ruamel-py

 na
{'http://foo.com': None, 'omitted value:': None, 'unquoted': 'separate'}

ruby-psych-json

 na
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): found unexpected ':' while scanning a plain scalar at line 4 column 1 (Psych::SyntaxError)
	from /ruby/gems/psych/lib/psych.rb:458:in `parse_stream'
	from /ruby/gems/psych/lib/psych.rb:632:in `load_stream'
	from /yaml/bin/ruby-psych-json:6:in `<main>'

perl-tiny-perl

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