# YAML Test Matrix

--- &test-UDM2
  Title: Plain URL in flow mapping
  Tags: [ flow, scalar ]

YAML

- { url: http://example.org }

Expected Events

+STR
+DOC
+SEQ
+MAP
=VAL :url
=VAL :http://example.org
-MAP
-SEQ
-DOC
-STR

Expected JSON

[
{
"url": "http://example.org"
}
]

cpp-event

 ok

hs-yaml-event

 ok

java-event

 ok

js-event

 ok

libyaml-event

 ok

nimyaml-event

 ok

perl5-pegex-event

 ok

perl5-pp-event

 ok

pyyaml-event

 ok

ruamel-event

 ok

hs-yaml-json

 json_ok

java-json

 json_ok

js-json

 json_ok

js-yaml-json

 json_ok

perl5-pm-json

 json_ok

perl5-pp-json

 json_ok

perl5-syck-json

 json_ok

pyyaml-json

 json_ok

ruamel-json

 json_ok

luajit-json

 error
luajit: found unexpected ':' at document: 1, line: 1, column: 14
while scanning a plain scalar at line: 1, column: 10

stack traceback:
	[C]: in function 'load'
	/bin/luajit-json:6: in main chunk
	[C]: at 0x004044a0

perl5-tiny-json

 error
YAML::Tiny found illegal characters in plain scalar: '{ url: http://example.org }' at /bin/perl5-tiny-json line 12.

perl5-tiny-pl

 error
YAML::Tiny found illegal characters in plain scalar: '{ url: http://example.org }' at /bin/perl5-tiny-pl line 15.

perl5-xs-json

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

    found unexpected ':'

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

perl5-xs-pl

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

    found unexpected ':'

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

ruby-json

 error
/usr/lib/ruby/2.3.0/psych.rb:380:in `parse': (<unknown>): found unexpected ':' while scanning a plain scalar at line 1 column 10 (Psych::SyntaxError)
	from /usr/lib/ruby/2.3.0/psych.rb:380:in `parse_stream'
	from /usr/lib/ruby/2.3.0/psych.rb:463:in `load_stream'
	from /bin/ruby-json:6:in `<main>'

perl5-pm-pl

 na
[
  {
    'url' => 'http://example.org'
  }
]

perl5-pp-pl

 na
[
  {
    'url' => 'http://example.org'
  }
]

perl5-syck-pl

 na
[
  {
    'url' => 'http://example.org'
  }
]

pyyaml-py

 na
[{'url': 'http://example.org'}]

ruamel-py

 na
[{'url': 'http://example.org'}]