# YAML Test Matrix

--- &test-7ZZ5
  Title: Empty flow collections
  Tags: [ flow, mapping, sequence ]

YAML

---
nested sequences:
- - - []
- - - {}
key1: []
key2: {}

Expected Events

+STR
+DOC ---
+MAP
=VAL :nested sequences
+SEQ
+SEQ
+SEQ
+SEQ []
-SEQ
-SEQ
-SEQ
+SEQ
+SEQ
+MAP {}
-MAP
-SEQ
-SEQ
-SEQ
=VAL :key1
+SEQ []
-SEQ
=VAL :key2
+MAP {}
-MAP
-MAP
-DOC
-STR

Expected JSON

{
"key1": [],
"key2": {},
"nested sequences": [
[
[
[]
]
],
[
[
{}
]
]
]
}

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

dotnet-yamldotnet-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-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
{
  "key1": {},
  "key2": {},
  "nested sequences": [
    [
      [
        {}
      ]
    ],
    [
      [
        {}
      ]
    ]
  ]
}

perl-pp-perl

 na
{
  'key1' => [],
  'key2' => {},
  'nested sequences' => [
                          [
                            [
                              []
                            ]
                          ],
                          [
                            [
                              {}
                            ]
                          ]
                        ]
}

perl-pplibyaml-perl

 na
{
  'key1' => [],
  'key2' => {},
  'nested sequences' => [
                          [
                            [
                              []
                            ]
                          ],
                          [
                            [
                              {}
                            ]
                          ]
                        ]
}

perl-syck-perl

 na
{
  'key1' => [],
  'key2' => {},
  'nested sequences' => [
                          [
                            [
                              []
                            ]
                          ],
                          [
                            [
                              {}
                            ]
                          ]
                        ]
}

perl-xs-perl

 na
{
  'key1' => [],
  'key2' => {},
  'nested sequences' => [
                          [
                            [
                              []
                            ]
                          ],
                          [
                            [
                              {}
                            ]
                          ]
                        ]
}

perl-yaml-perl

 na
{
  'key1' => [],
  'key2' => {},
  'nested sequences' => [
                          [
                            [
                              []
                            ]
                          ],
                          [
                            [
                              {}
                            ]
                          ]
                        ]
}

py-pyyaml-py

 na
{'key1': [], 'key2': {}, 'nested sequences': [[[[]]], [[{}]]]}

py-ruamel-py

 na
{'key1': [], 'key2': {}, 'nested sequences': [[[[]]], [[{}]]]}

perl-tiny-json

 ni
YAML::Tiny found illegal characters in plain scalar: '- - []' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny found illegal characters in plain scalar: '- - []' at /yaml/bin/perl-tiny-perl line 15.