# YAML Test Matrix

--- &test-QF4Y
  Title: Spec Example 7.19. Single Pair Flow Mappings
  Tags: [ flow, mapping, spec ]

YAML

[
foo: bar
]

Expected Events

+STR
+DOC
+SEQ []
+MAP {}
=VAL :foo
=VAL :bar
-MAP
-SEQ
-DOC
-STR

Expected JSON

[
{
"foo": "bar"
}
]

c-libfyaml-event

 ok

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

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

lua-lyaml-json

 json_ok

perl-pp-json

 json_ok

perl-pplibyaml-json

 json_ok

perl-syck-json

 json_ok

perl-xs-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-yaml-json

 error
YAML Error: Expected separator '---'
   Code: YAML_PARSE_ERR_NO_SEPARATOR
   Line: 1
   Document: 2
 at /perl5/lib/perl5/YAML/Loader.pm line 88.

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.

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +SEQ |
   1    0    0    0 =SYNX|[
   1    1    1    1 =EOL |\x0a
   2    0    2    2 +MAP |
   2    0    2    2 +PAIR|
   2    0    2    2 +NODE|
   2    0    2    2 +VAL |
   2    0    2    2 =TEXT|foo
   2    3    5    5 -VAL |
   2    3    5    5 -NODE|
   2    3    5    5 =SYNX|:
   2    4    6    6 =WSPC|.
   2    5    7    7 +NODE|
   2    5    7    7 +VAL |
   2    5    7    7 =TEXT|bar
   2    8   10   10 -VAL |
   2    8   10   10 -NODE|
   2    8   10   10 -PAIR|
   2    8   10   10 -MAP |
   2    8   10   10 =EOL |\x0a
   3    0   11   11 =SYNX|]
   3    1   12   12 -SEQ |
   3    1   12   12 -NODE|
   3    1   12   12 =EOL |\x0a
   4    0   13   13 -DOC |

perl-pp-perl

 na
[
  {
    'foo' => 'bar'
  }
]

perl-pplibyaml-perl

 na
[
  {
    'foo' => 'bar'
  }
]

perl-syck-perl

 na
[
  {
    'foo' => 'bar'
  }
]

perl-xs-perl

 na
[
  {
    'foo' => 'bar'
  }
]

py-pyyaml-py

 na
[{'foo': 'bar'}]

py-ruamel-py

 na
[{'foo': 'bar'}]

perl-tiny-json

 ni
YAML::Tiny failed to classify line '[' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

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