--- &test-M2N8:01
Title: Question mark edge cases
Tags: [ edge, empty-key ]
+STR
+DOC
+MAP
+MAP
+SEQ []
-SEQ
=VAL :x
-MAP
=VAL :
-MAP
-DOC
-STR
diff
Minimal Events:
+STR
+DOC
+MAP
+MAP
+SEQ
-SEQ
=VAL :x
-MAP
=VAL :
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :[]
=VAL :x
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :[]
=VAL :x
-MAP
-DOC
-STR
error
+STR
+DOC
+MAP
+SEQ []
-SEQ
Line : 1
Column : 5
Expected : EOL
Got : COLON
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 392
YAML : ": x\n"
at /yaml/bin/perl-pp-event line 46.
error
Line : 1
Column : 5
Expected : EOL
Got : COLON
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 392
YAML : ": x\n"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
error
Syck parser (line 1, column 5): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
error
YAML Error: Couldn't parse single line value
Code: YAML_PARSE_ERR_SINGLE_LINE
Line: 1
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 164.
error
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-py", line 38, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 125, in construct_document
for _dummy in generator:
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 633, in construct_yaml_map
value = self.construct_mapping(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 429, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 237, in construct_mapping
raise ConstructorError(
ruamel.yaml.constructor.ConstructorError: while constructing a mapping
in "<unicode string>", line 1, column 1:
? []: x
^ (line: 1)
found unhashable key
in "<unicode string>", line 1, column 3:
? []: x
^ (line: 1)
na
{
stdin:1:3: error: Non scalar keys are not allowed in JSON emit mode
? []: x
^~~~~
na
yaml: did not find expected key
na
{"{\"[]\":\"x\"}":null}
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 =SYNX|?
1 1 1 1 =DENT|.
1 2 2 2 +NODE|
1 2 2 2 +MAP |
1 2 2 2 +PAIR|
1 2 2 2 +NODE|
1 2 2 2 +SEQ |
1 2 2 2 =SYNX|[
1 3 3 3 =SYNX|]
1 4 4 4 -SEQ |
1 4 4 4 -NODE|
1 4 4 4 =SYNX|:
1 5 5 5 =WSPC|.
1 6 6 6 +NODE|
1 6 6 6 +VAL |
1 6 6 6 =TEXT|x
1 7 7 7 -VAL |
1 7 7 7 -NODE|
1 7 7 7 =EOL |\x0a
2 0 8 8 -PAIR|
2 0 8 8 -MAP |
2 0 8 8 -NODE|
2 0 8 8 +NODE|
2 0 8 8 +VAL |
2 0 8 8 -VAL |
2 0 8 8 -NODE|
2 0 8 8 -PAIR|
2 0 8 8 -MAP |
2 0 8 8 -NODE|
2 0 8 8 -DOC |
na
{"[object Object]":null}
na
{
"{\n ? []\n : x\n}": null
}
(node:2945) Warning: Keys with collection values will be stringified due to JS Object restrictions: "[]". Set mapAsMap: true to use object keys.
(Use `node --trace-warnings ...` to show where the warning was created)
na
luajit: /yaml/bin/lua-lyaml-json:8: Cannot serialise table: table key must be a number or string
stack traceback:
[C]: in function 'encode'
/yaml/bin/lua-lyaml-json:8: in main chunk
[C]: at 0x558c912c0ed0
na
Line : 1
Column : 5
Expected : EOL
Got : COLON
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 392
YAML : ": x\n"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
na
{
"{'[]' => 'x'}" : null
}
na
{
'{\'[]\' => \'x\'}' => undef
}
na
Syck parser (line 1, column 5): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
na
{
"HASH(0x7f0b5e2fe8d0)" : null
}
na
{
'HASH(0x7f2ce3b6c608)' => undef
}
na
YAML Error: Couldn't parse single line value
Code: YAML_PARSE_ERR_SINGLE_LINE
Line: 1
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 164.
na
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-json", line 19, in <module>
for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
yield loader.get_data()
^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
return self.construct_document(self.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 60, in construct_document
for dummy in generator:
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 413, in construct_yaml_map
value = self.construct_mapping(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 218, in construct_mapping
return super().construct_mapping(node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 141, in construct_mapping
raise ConstructorError("while constructing a mapping", node.start_mark,
yaml.constructor.ConstructorError: while constructing a mapping
in "<unicode string>", line 1, column 1:
? []: x
^
found unhashable key
in "<unicode string>", line 1, column 3:
? []: x
^
na
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-json", line 21, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 125, in construct_document
for _dummy in generator:
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 633, in construct_yaml_map
value = self.construct_mapping(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 429, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 237, in construct_mapping
raise ConstructorError(
ruamel.yaml.constructor.ConstructorError: while constructing a mapping
in "<unicode string>", line 1, column 1:
? []: x
^ (line: 1)
found unhashable key
in "<unicode string>", line 1, column 3:
? []: x
^ (line: 1)
ni
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-py", line 36, in <module>
for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
yield loader.get_data()
^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
return self.construct_document(self.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 60, in construct_document
for dummy in generator:
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 413, in construct_yaml_map
value = self.construct_mapping(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 218, in construct_mapping
return super().construct_mapping(node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 141, in construct_mapping
raise ConstructorError("while constructing a mapping", node.start_mark,
yaml.constructor.ConstructorError: while constructing a mapping
in "<unicode string>", line 1, column 1:
? []: x
^
found unhashable key
in "<unicode string>", line 1, column 3:
? []: x
^