# YAML Test Matrix

--- &test-PUW8
  Title: Document start on last line
  Tags: [ header ]

YAML

---
a: b
---

Expected Events

+STR
+DOC ---
+MAP
=VAL :a
=VAL :b
-MAP
-DOC
+DOC ---
=VAL :
-DOC
-STR

Expected JSON

{
"a": "b"
}
null

c-libfyaml-event

 ok

c-libyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

java-snakeyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-pplibyaml-event

 ok

perl-refparser-event

 ok

py-pyyaml-event

 ok

py-ruamel-event

 ok

c-libfyaml-json

 json_ok

hs-hsyaml-json

 json_ok

java-snakeyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-syck-json

 json_ok

perl-tiny-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

lua-lyaml-json

 json_diff
{
  "a": "b"
}
{}

dotnet-yamldotnet-json

 error
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 3, Col: 1, Idx: 9) - (Line: 3, Col: 4, Idx: 12): Expected 'StreamEnd', got 'DocumentStart' (at Line: 3, Col: 1, Idx: 9).
   at YamlDotNet.Core.ParserExtensions.Require[T](IParser parser)
   at YamlDotNet.Core.ParserExtensions.Consume[T](IParser parser)
   at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input)
   at Program.Main(String[] commandLineArguments)
Aborted (core dumped)

perl-pp-perl

 na
{
  'a' => 'b'
}
undef

perl-pplibyaml-perl

 na
{
  'a' => 'b'
}
undef

perl-syck-perl

 na
{
  'a' => 'b'
}
undef

perl-tiny-perl

 na
{
  'a' => 'b'
}
undef

perl-xs-perl

 na
{
  'a' => 'b'
}
undef

perl-yaml-perl

 na
{
  'a' => 'b'
}
undef

py-pyyaml-py

 na
{'a': 'b'}
None

py-ruamel-py

 na
{'a': 'b'}
None