# YAML Test Matrix

--- &test-UDR7
  Title: Spec Example 5.4. Flow Collection Indicators
  Tags: [ flow, mapping, sequence, spec ]

YAML

sequence: [ one, two, ]
mapping: { sky: blue, sea: green }

Expected Events

+STR
+DOC
+MAP
=VAL :sequence
+SEQ []
=VAL :one
=VAL :two
-SEQ
=VAL :mapping
+MAP {}
=VAL :sky
=VAL :blue
=VAL :sea
=VAL :green
-MAP
-MAP
-DOC
-STR

Expected JSON

{
"mapping": {
"sea": "green",
"sky": "blue"
},
"sequence": [
"one",
"two"
]
}

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-xs-json

 json_ok

perl-yaml-json

 json_ok

py-pyyaml-json

 json_ok

py-ruamel-json

 json_ok

ruby-psych-json

 json_ok

perl-syck-json

 error
Syck parser (line 1, column 23): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.

perl-syck-perl

 error
Syck parser (line 1, column 23): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 +NODE|
   1    0    0    0 +MAP |
   1    0    0    0 +PAIR|
   1    0    0    0 +NODE|
   1    0    0    0 +VAL |
   1    0    0    0 =TEXT|sequence
   1    8    8    8 -VAL |
   1    8    8    8 -NODE|
   1    8    8    8 =SYNX|:
   1    9    9    9 =WSPC|.
   1   10   10   10 +NODE|
   1   10   10   10 +SEQ |
   1   10   10   10 =SYNX|[
   1   11   11   11 =WSPC|.
   1   12   12   12 +NODE|
   1   12   12   12 +VAL |
   1   12   12   12 =TEXT|one
   1   15   15   15 -VAL |
   1   15   15   15 -NODE|
   1   15   15   15 =SYNX|,
   1   16   16   16 =WSPC|.
   1   17   17   17 +NODE|
   1   17   17   17 +VAL |
   1   17   17   17 =TEXT|two
   1   20   20   20 -VAL |
   1   20   20   20 -NODE|
   1   20   20   20 =SYNX|,
   1   21   21   21 =WSPC|.
   1   22   22   22 =SYNX|]
   1   23   23   23 -SEQ |
   1   23   23   23 -NODE|
   1   23   23   23 =EOL |\x0a
   2    0   24   24 -PAIR|
   2    0   24   24 +PAIR|
   2    0   24   24 +NODE|
   2    0   24   24 +VAL |
   2    0   24   24 =TEXT|mapping
   2    7   31   31 -VAL |
   2    7   31   31 -NODE|
   2    7   31   31 =SYNX|:
   2    8   32   32 =WSPC|.
   2    9   33   33 +NODE|
   2    9   33   33 +MAP |
   2    9   33   33 =SYNX|{
   2   10   34   34 =WSPC|.
   2   11   35   35 +PAIR|
   2   11   35   35 +NODE|
   2   11   35   35 +VAL |
   2   11   35   35 =TEXT|sky
   2   14   38   38 -VAL |
   2   14   38   38 -NODE|
   2   14   38   38 =SYNX|:
   2   15   39   39 =WSPC|.
   2   16   40   40 +NODE|
   2   16   40   40 +VAL |
   2   16   40   40 =TEXT|blue
   2   20   44   44 -VAL |
   2   20   44   44 -NODE|
   2   20   44   44 -PAIR|
   2   20   44   44 =SYNX|,
   2   21   45   45 =WSPC|.
   2   22   46   46 +PAIR|
   2   22   46   46 +NODE|
   2   22   46   46 +VAL |
   2   22   46   46 =TEXT|sea
   2   25   49   49 -VAL |
   2   25   49   49 -NODE|
   2   25   49   49 =SYNX|:
   2   26   50   50 =WSPC|.
   2   27   51   51 +NODE|
   2   27   51   51 +VAL |
   2   27   51   51 =TEXT|green
   2   32   56   56 -VAL |
   2   32   56   56 -NODE|
   2   32   56   56 -PAIR|
   2   32   56   56 =WSPC|.
   2   33   57   57 =SYNX|}
   2   34   58   58 -MAP |
   2   34   58   58 -NODE|
   2   34   58   58 =EOL |\x0a
   3    0   59   59 -PAIR|
   3    0   59   59 -MAP |
   3    0   59   59 -NODE|
   3    0   59   59 -DOC |

perl-pp-perl

 na
{
  'mapping' => {
                 'sea' => 'green',
                 'sky' => 'blue'
               },
  'sequence' => [
                  'one',
                  'two'
                ]
}

perl-pplibyaml-perl

 na
{
  'mapping' => {
                 'sea' => 'green',
                 'sky' => 'blue'
               },
  'sequence' => [
                  'one',
                  'two'
                ]
}

perl-xs-perl

 na
{
  'mapping' => {
                 'sea' => 'green',
                 'sky' => 'blue'
               },
  'sequence' => [
                  'one',
                  'two'
                ]
}

perl-yaml-perl

 na
{
  'mapping' => {
                 'sea' => 'green',
                 'sky' => 'blue'
               },
  'sequence' => [
                  'one',
                  'two'
                ]
}

py-pyyaml-py

 na
{'mapping': {'sea': 'green', 'sky': 'blue'}, 'sequence': ['one', 'two']}

py-ruamel-py

 na
{'mapping': {'sea': 'green', 'sky': 'blue'}, 'sequence': ['one', 'two']}

perl-tiny-json

 ni
YAML::Tiny found illegal characters in plain scalar: '{ sky: blue, sea: green }' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny found illegal characters in plain scalar: '{ sky: blue, sea: green }' at /yaml/bin/perl-tiny-perl line 15.