# YAML Test Matrix

--- &test-HM87:01
  Title: Scalars in flow start with syntax char
  Tags: [ flow, scalar ]

YAML

[?x]

Expected Events

+STR
+DOC
+SEQ []
=VAL :?x
-SEQ
-DOC
-STR

Expected JSON

[
"?x"
]

c-libfyaml-event

 ok

cpp-rapidyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

rust-yamlrust-event

 ok

c-libfyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-syck-json

 json_ok

c-libyaml-event

 diff
Got Events:
+STR
+DOC
+SEQ []
+MAP {}
=VAL :x
=VAL :
-MAP
-SEQ
-DOC
-STR

dotnet-yamldotnet-event

 diff
Minimal Events:
+STR
+DOC
+SEQ
=VAL :?x
-SEQ
-DOC
-STR
Got Events:
+STR
+DOC
+SEQ
+MAP
=VAL :x
=VAL :
-MAP
-SEQ
-DOC
-STR

py-pyyaml-event

 diff
Got Events:
+STR
+DOC
+SEQ []
+MAP {}
=VAL :x
=VAL :
-MAP
-SEQ
-DOC
-STR

py-ruamel-event

 diff
Got Events:
+STR
+DOC
+SEQ []
+MAP {}
=VAL :x
=VAL :
-MAP
-SEQ
-DOC
-STR

dotnet-yamldotnet-json

 json_diff
[
  {
    "x": null
  }
]

go-yaml-json

 json_diff
[
  {
    "x": null
  }
]

lua-lyaml-json

 json_diff
[
  {
    "x": {}
  }
]

perl-pplibyaml-json

 json_diff
[
  {
    "x": null
  }
]

perl-xs-json

 json_diff
[
  {
    "x": null
  }
]

py-pyyaml-json

 json_diff
[
  {
    "x": null
  }
]

py-ruamel-json

 json_diff
[
  {
    "x": null
  }
]

ruby-psych-json

 json_diff
[
  {
    "x": null
  }
]

cpp-yamlcpp-event

 error
+STR
Exception:
yaml-cpp: error at line 1, column 2: unknown token

hs-hsyaml-event

 error
+STR
+DOC
+SEQ []
-SEQ
Parsing error near byte offset Pos {posByteOffset = 1, posCharOffset = 1, posLine = 1, posColumn = 1} (Unexpected '?')

hs-hsyaml-json

 error
hsyaml-parser: user error (Unexpected '?')

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 -SEQ |
   1    1    1    1 -NODE|
   1    1    1    1 =ERR |Unexpected.'?'
   1    1    1    1 =REST|?x]
   1    4    4    4 =REST|\x0a
   2    0    5    5 -DOC |

perl-pp-perl

 na
[
  '?x'
]

perl-pplibyaml-perl

 na
[
  {
    'x' => undef
  }
]

perl-syck-perl

 na
[
  '?x'
]

perl-xs-perl

 na
[
  {
    'x' => undef
  }
]

py-pyyaml-py

 na
[{'x': None}]

py-ruamel-py

 na
[{'x': None}]

perl-tiny-json

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

perl-tiny-perl

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