--- &test-XW4D
Title: Various Trailing Comments
Tags: [ 1.3-err, comment, explicit-key, folded ]
a: "double
quotes" # lala
b: plain
value # lala
c : #lala
d
? # lala
- seq1
: # lala
- #lala
seq2
e:
&node # lala
- x: y
block: > # lala
abcde
+STR
+DOC
+MAP
=VAL :a
=VAL "double quotes
=VAL :b
=VAL :plain value
=VAL :c
=VAL :d
+SEQ
=VAL :seq1
-SEQ
+SEQ
=VAL :seq2
-SEQ
=VAL :e
+SEQ &node
+MAP
=VAL :x
=VAL :y
-MAP
-SEQ
=VAL :block
=VAL >abcde\n
-MAP
-DOC
-STR
error
-:8:1: (76B): ERROR: parse error - indentation should not increase at this point
-:8:1: - seq1 (size=7)
^~~~~~~ (cols 1-8)
error
YAML Error: Inconsistent indentation level
Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 804.
error
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:
a: "double
^
found unhashable key
in "<unicode string>", line 8, column 2:
- seq1
^
na
{
"a": "double quotes",
"b": "plain value",
"c": "d",
stdin:8:2: error: Non scalar keys are not allowed in JSON emit mode
- seq1
^~~~~~
na
{"a": "double quotes", "b": "plain value", "c": "d", ? ["seq1"] : ["seq2"], "e": [{"x": "y"}], "block": "abcde\n"}
na
yaml: invalid map key: []interface {}{"seq1"}
na
{"[\"seq1\"]":["seq2"],"a":"double quotes","b":"plain value","block":"abcde\n","c":"d","e":[{"x":"y"}]}
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|a
1 1 1 1 -VAL |
1 1 1 1 -NODE|
1 1 1 1 =SYNX|:
1 2 2 2 =WSPC|.
1 3 3 3 +NODE|
1 3 3 3 +VAL |
1 3 3 3 =SYNX|"
1 4 4 4 =TEXT|double
1 10 10 10 =FOLD|\x0a
2 0 11 11 =DENT|.
2 1 12 12 =WSPC|.
2 2 13 13 =TEXT|quotes
2 8 19 19 =SYNX|"
2 9 20 20 -VAL |
2 9 20 20 -NODE|
2 9 20 20 =WSPC|.
2 10 21 21 +COMM|
2 10 21 21 =SYNX|#
2 11 22 22 =META|.lala
2 16 27 27 -COMM|
2 16 27 27 =EOL |\x0a
3 0 28 28 -PAIR|
3 0 28 28 +PAIR|
3 0 28 28 +NODE|
3 0 28 28 +VAL |
3 0 28 28 =TEXT|b
3 1 29 29 -VAL |
3 1 29 29 -NODE|
3 1 29 29 =SYNX|:
3 2 30 30 =WSPC|.
3 3 31 31 +NODE|
3 3 31 31 +VAL |
3 3 31 31 =TEXT|plain
3 8 36 36 =FOLD|\x0a
4 0 37 37 =DENT|.
4 1 38 38 =TEXT|value
4 6 43 43 -VAL |
4 6 43 43 -NODE|
4 6 43 43 =WSPC|..
4 8 45 45 +COMM|
4 8 45 45 =SYNX|#
4 9 46 46 =META|.lala
4 14 51 51 -COMM|
4 14 51 51 =EOL |\x0a
5 0 52 52 -PAIR|
5 0 52 52 +PAIR|
5 0 52 52 +NODE|
5 0 52 52 +VAL |
5 0 52 52 =TEXT|c
5 1 53 53 -VAL |
5 1 53 53 -NODE|
5 1 53 53 =WSPC|..
5 3 55 55 =SYNX|:
5 4 56 56 =WSPC|.
5 5 57 57 +COMM|
5 5 57 57 =SYNX|#
5 6 58 58 =META|lala
5 10 62 62 -COMM|
5 10 62 62 =EOL |\x0a
6 0 63 63 =DENT|.
6 1 64 64 =WSPC|.
6 2 65 65 +NODE|
6 2 65 65 +VAL |
6 2 65 65 =TEXT|d
6 3 66 66 -VAL |
6 3 66 66 -NODE|
6 3 66 66 =EOL |\x0a
7 0 67 67 -PAIR|
7 0 67 67 +PAIR|
7 0 67 67 =SYNX|?
7 1 68 68 +NODE|
7 1 68 68 =WSPC|.
7 2 69 69 +COMM|
7 2 69 69 =SYNX|#
7 3 70 70 =META|.lala
7 8 75 75 -COMM|
7 8 75 75 =EOL |\x0a
8 0 76 76 +SEQ |
8 0 76 76 =DENT|.
8 1 77 77 =SYNX|-
8 2 78 78 =WSPC|.
8 3 79 79 +NODE|
8 3 79 79 +VAL |
8 3 79 79 =TEXT|seq1
8 7 83 83 -VAL |
8 7 83 83 -NODE|
8 7 83 83 =EOL |\x0a
9 0 84 84 -SEQ |
9 0 84 84 -NODE|
9 0 84 84 =SYNX|:
9 1 85 85 +NODE|
9 1 85 85 =WSPC|.
9 2 86 86 +COMM|
9 2 86 86 =SYNX|#
9 3 87 87 =META|.lala
9 8 92 92 -COMM|
9 8 92 92 =EOL |\x0a
10 0 93 93 +SEQ |
10 0 93 93 =DENT|.
10 1 94 94 =SYNX|-
10 2 95 95 =WSPC|.
10 3 96 96 +COMM|
10 3 96 96 =SYNX|#
10 4 97 97 =META|lala
10 8 101 101 -COMM|
10 8 101 101 =EOL |\x0a
11 0 102 102 =DENT|..
11 2 104 104 +NODE|
11 2 104 104 +VAL |
11 2 104 104 =TEXT|seq2
11 6 108 108 -VAL |
11 6 108 108 -NODE|
11 6 108 108 =EOL |\x0a
12 0 109 109 -SEQ |
12 0 109 109 -NODE|
12 0 109 109 -PAIR|
12 0 109 109 +PAIR|
12 0 109 109 +NODE|
12 0 109 109 +VAL |
12 0 109 109 =TEXT|e
12 1 110 110 -VAL |
12 1 110 110 -NODE|
12 1 110 110 =SYNX|:
12 2 111 111 +NODE|
12 2 111 111 =EOL |\x0a
13 0 112 112 =DENT|.
13 1 113 113 +PROP|
13 1 113 113 +ANCH|
13 1 113 113 =SYNX|&
13 2 114 114 =META|node
13 6 118 118 -ANCH|
13 6 118 118 -PROP|
13 6 118 118 =WSPC|.
13 7 119 119 +COMM|
13 7 119 119 =SYNX|#
13 8 120 120 =META|.lala
13 13 125 125 -COMM|
13 13 125 125 =EOL |\x0a
14 0 126 126 +SEQ |
14 0 126 126 =DENT|.
14 1 127 127 =SYNX|-
14 2 128 128 =DENT|.
14 3 129 129 +NODE|
14 3 129 129 +MAP |
14 3 129 129 +PAIR|
14 3 129 129 +NODE|
14 3 129 129 +VAL |
14 3 129 129 =TEXT|x
14 4 130 130 -VAL |
14 4 130 130 -NODE|
14 4 130 130 =SYNX|:
14 5 131 131 =WSPC|.
14 6 132 132 +NODE|
14 6 132 132 +VAL |
14 6 132 132 =TEXT|y
14 7 133 133 -VAL |
14 7 133 133 -NODE|
14 7 133 133 =EOL |\x0a
15 0 134 134 -PAIR|
15 0 134 134 -MAP |
15 0 134 134 -NODE|
15 0 134 134 -SEQ |
15 0 134 134 -NODE|
15 0 134 134 -PAIR|
15 0 134 134 +PAIR|
15 0 134 134 +NODE|
15 0 134 134 +VAL |
15 0 134 134 =TEXT|block
15 5 139 139 -VAL |
15 5 139 139 -NODE|
15 5 139 139 =SYNX|:
15 6 140 140 +NODE|
15 6 140 140 =WSPC|.
15 7 141 141 +VAL |
15 7 141 141 =SYNX|>
15 8 142 142 =WSPC|.
15 9 143 143 +COMM|
15 9 143 143 =SYNX|#
15 10 144 144 =META|.lala
15 15 149 149 -COMM|
15 15 149 149 =EOL |\x0a
16 0 150 150 =DENT|..
16 2 152 152 =TEXT|abcde
16 7 157 157 =NEWL|\x0a
17 0 158 158 -VAL |
17 0 158 158 -NODE|
17 0 158 158 -PAIR|
17 0 158 158 -MAP |
17 0 158 158 -NODE|
17 0 158 158 -DOC |
na
{"a":"double quotes","b":"plain value","c":"d","seq1":["seq2"],"e":[{"x":"y"}],"block":"abcde\n"}
na
{
"a": "double quotes",
"b": "plain value",
"c": "d",
"[ seq1 ]": [
"seq2"
],
"e": [
{
"x": "y"
}
],
"block": "abcde\n"
}
(node:4077) Warning: Keys with collection values will be stringified due to JS Object restrictions: "[ seq1 ]". 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 0x55dfa71e0ed0
na
{
"['seq1']" : [
"seq2"
],
"a" : "double quotes",
"b" : "plain value",
"block" : "abcde\n",
"c" : "d",
"e" : [
{
"x" : "y"
}
]
}
na
{
'[\'seq1\']' => [
'seq2'
],
'a' => 'double quotes',
'b' => 'plain value',
'block' => 'abcde
',
'c' => 'd',
'e' => [
{
'x' => 'y'
}
]
}
na
{
"['seq1']" : [
"seq2"
],
"a" : "double quotes",
"b" : "plain value",
"block" : "abcde\n",
"c" : "d",
"e" : [
{
"x" : "y"
}
]
}
na
{
'[\'seq1\']' => [
'seq2'
],
'a' => 'double quotes',
'b' => 'plain value',
'block' => 'abcde
',
'c' => 'd',
'e' => [
{
'x' => 'y'
}
]
}
na
{
"ARRAY(0x7f98ae256c30)" : [
"seq2"
],
"a" : "double quotes",
"b" : "plain value",
"block" : "abcde\n",
"c" : "d",
"e" : [
{
"x" : true
}
]
}
na
{
'ARRAY(0x7f37b3cba818)' => [
'seq2'
],
'a' => 'double quotes',
'b' => 'plain value',
'block' => 'abcde
',
'c' => 'd',
'e' => [
{
'x' => !!1
}
]
}
na
YAML::Tiny does not support a feature in line '"double' at /yaml/bin/perl-tiny-json line 12.
na
{
"ARRAY(0x7ff40e366880)" : [
"seq2"
],
"a" : "double quotes",
"b" : "plain value",
"block" : "abcde\n",
"c" : "d",
"e" : [
{
"x" : "y"
}
]
}
na
{
'ARRAY(0x7fa079f91698)' => [
'seq2'
],
'a' => 'double quotes',
'b' => 'plain value',
'block' => 'abcde
',
'c' => 'd',
'e' => [
{
'x' => 'y'
}
]
}
na
YAML Error: Inconsistent indentation level
Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 804.
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:
a: "double
^
found unhashable key
in "<unicode string>", line 8, column 2:
- seq1
^
na
Error json.dumps: <class 'TypeError'>
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-json", line 23, in <module>
print(json.dumps(doc, sort_keys=True, skipkeys=True, indent=2))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 238, in dumps
**kw).encode(obj)
^^^^^^^^^^^
File "/usr/lib/python3.12/json/encoder.py", line 202, in encode
chunks = list(chunks)
^^^^^^^^^^^^
File "/usr/lib/python3.12/json/encoder.py", line 432, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/usr/lib/python3.12/json/encoder.py", line 354, in _iterencode_dict
items = sorted(dct.items())
^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'tuple' and 'str'
na
{'a': 'double quotes',
'b': 'plain value',
'block': 'abcde\n',
'c': 'd',
'e': [{'x': 'y'}],
('seq1',): ['seq2']}
na
{"a":"double quotes","b":"plain value","c":"d","[\"seq1\"]":["seq2"],"e":[{"x":"y"}],"block":"abcde\n"}
ni
YAML::Tiny does not support a feature in line '"double' at /yaml/bin/perl-tiny-perl line 15.