# YAML Test Matrix

--- &test-F3CP
  Title: Nested flow collections on one line
  Tags: [ flow, mapping, sequence ]

YAML

---
{ a: [b, c, { d: [e, f] } ] }

Expected Events

+STR
+DOC ---
+MAP {}
=VAL :a
+SEQ []
=VAL :b
=VAL :c
+MAP {}
=VAL :d
+SEQ []
=VAL :e
=VAL :f
-SEQ
-MAP
-SEQ
-MAP
-DOC
-STR

Expected JSON

{
"a": [
"b",
"c",
{
"d": [
"e",
"f"
]
}
]
}

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: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 360.

perl-yaml-perl

 error
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 2
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 360.

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 =HEAD|---
   1    3    3    3 =EOL |\x0a
   2    0    4    4 +NODE|
   2    0    4    4 +MAP |
   2    0    4    4 =SYNX|{
   2    1    5    5 =WSPC|.
   2    2    6    6 +PAIR|
   2    2    6    6 +NODE|
   2    2    6    6 +VAL |
   2    2    6    6 =TEXT|a
   2    3    7    7 -VAL |
   2    3    7    7 -NODE|
   2    3    7    7 =SYNX|:
   2    4    8    8 =WSPC|.
   2    5    9    9 +NODE|
   2    5    9    9 +SEQ |
   2    5    9    9 =SYNX|[
   2    6   10   10 +NODE|
   2    6   10   10 +VAL |
   2    6   10   10 =TEXT|b
   2    7   11   11 -VAL |
   2    7   11   11 -NODE|
   2    7   11   11 =SYNX|,
   2    8   12   12 =WSPC|.
   2    9   13   13 +NODE|
   2    9   13   13 +VAL |
   2    9   13   13 =TEXT|c
   2   10   14   14 -VAL |
   2   10   14   14 -NODE|
   2   10   14   14 =SYNX|,
   2   11   15   15 =WSPC|.
   2   12   16   16 +NODE|
   2   12   16   16 +MAP |
   2   12   16   16 =SYNX|{
   2   13   17   17 =WSPC|.
   2   14   18   18 +PAIR|
   2   14   18   18 +NODE|
   2   14   18   18 +VAL |
   2   14   18   18 =TEXT|d
   2   15   19   19 -VAL |
   2   15   19   19 -NODE|
   2   15   19   19 =SYNX|:
   2   16   20   20 =WSPC|.
   2   17   21   21 +NODE|
   2   17   21   21 +SEQ |
   2   17   21   21 =SYNX|[
   2   18   22   22 +NODE|
   2   18   22   22 +VAL |
   2   18   22   22 =TEXT|e
   2   19   23   23 -VAL |
   2   19   23   23 -NODE|
   2   19   23   23 =SYNX|,
   2   20   24   24 =WSPC|.
   2   21   25   25 +NODE|
   2   21   25   25 +VAL |
   2   21   25   25 =TEXT|f
   2   22   26   26 -VAL |
   2   22   26   26 -NODE|
   2   22   26   26 =SYNX|]
   2   23   27   27 -SEQ |
   2   23   27   27 -NODE|
   2   23   27   27 -PAIR|
   2   23   27   27 =WSPC|.
   2   24   28   28 =SYNX|}
   2   25   29   29 -MAP |
   2   25   29   29 -NODE|
   2   25   29   29 =WSPC|.
   2   26   30   30 =SYNX|]
   2   27   31   31 -SEQ |
   2   27   31   31 -NODE|
   2   27   31   31 -PAIR|
   2   27   31   31 =WSPC|.
   2   28   32   32 =SYNX|}
   2   29   33   33 -MAP |
   2   29   33   33 -NODE|
   2   29   33   33 =EOL |\x0a
   3    0   34   34 -DOC |

perl-pp-perl

 na
{
  'a' => [
           'b',
           'c',
           {
             'd' => [
                      'e',
                      'f'
                    ]
           }
         ]
}

perl-pplibyaml-perl

 na
{
  'a' => [
           'b',
           'c',
           {
             'd' => [
                      'e',
                      'f'
                    ]
           }
         ]
}

perl-syck-perl

 na
{
  'a' => [
           'b',
           'c',
           {
             'd' => [
                      'e',
                      'f'
                    ]
           }
         ]
}

perl-xs-perl

 na
{
  'a' => [
           'b',
           'c',
           {
             'd' => [
                      'e',
                      'f'
                    ]
           }
         ]
}

py-pyyaml-py

 na
{'a': ['b', 'c', {'d': ['e', 'f']}]}

py-ruamel-py

 na
{'a': ['b', 'c', {'d': ['e', 'f']}]}

perl-tiny-json

 ni
YAML::Tiny found illegal characters in plain scalar: '[b, c, { d: [e, f] } ] }' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny found illegal characters in plain scalar: '[b, c, { d: [e, f] } ] }' at /yaml/bin/perl-tiny-perl line 15.