# YAML Test Matrix

--- &test-JHB9
  Title: Spec Example 2.7. Two Documents in a Stream
  Tags: [ header, spec ]

YAML

# Ranking of 1998 home runs
---
- Mark McGwire
- Sammy Sosa
- Ken Griffey

# Team ranking
---
- Chicago Cubs
- St Louis Cardinals

Expected Events

+STR
+DOC ---
+SEQ
=VAL :Mark McGwire
=VAL :Sammy Sosa
=VAL :Ken Griffey
-SEQ
-DOC
+DOC ---
+SEQ
=VAL :Chicago Cubs
=VAL :St Louis Cardinals
-SEQ
-DOC
-STR

Expected JSON

[
"Mark McGwire",
"Sammy Sosa",
"Ken Griffey"
]
[
"Chicago Cubs",
"St Louis Cardinals"
]

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

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

lua-lyaml-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

dotnet-yamldotnet-json

 error
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 8, Col: 1, Idx: 90) - (Line: 8, Col: 4, Idx: 93): Expected 'StreamEnd', got 'DocumentStart' (at Line: 8, Col: 1, Idx: 90).
   at YamlDotNet.Core.ParserExtensions.Expect[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
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

perl-pplibyaml-perl

 na
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

perl-syck-perl

 na
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

perl-tiny-perl

 na
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

perl-xs-perl

 na
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

perl-yaml-perl

 na
[
  'Mark McGwire',
  'Sammy Sosa',
  'Ken Griffey'
]
[
  'Chicago Cubs',
  'St Louis Cardinals'
]

py-pyyaml-py

 na
['Mark McGwire', 'Sammy Sosa', 'Ken Griffey']
['Chicago Cubs', 'St Louis Cardinals']

py-ruamel-py

 na
['Mark McGwire', 'Sammy Sosa', 'Ken Griffey']
['Chicago Cubs', 'St Louis Cardinals']