--- &test-VJP3:00
Title: Flow collections over many lines
Tags: [ flow, indent ]
+STR
+DOC
+MAP
=VAL :k
+MAP {}
invalid_incorrect
+STR
+DOC
+MAP
=VAL :k
+MAP
=VAL :k
=VAL :v
-MAP
-MAP
-DOC
-STR
invalid_incorrect
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|k
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 +MAP |
1 3 3 3 =SYNX|{
1 4 4 4 -MAP |
1 4 4 4 -NODE|
1 4 4 4 =ERR |Unexpected.'\x0a'
1 4 4 4 =REST|\x0a
2 0 5 5 -PAIR|
2 0 5 5 -MAP |
2 0 5 5 -NODE|
2 0 5 5 -DOC |
2 0 5 5 =ERR |Unexpected.'k'
invalid_incorrect
{
"k" : {
"k" : "v"
}
}
invalid_incorrect
{
'k' => {
'k' => 'v'
}
}
invalid_correct
stdin:2:1: error: wrongly indented flow mapping
k
^
+STR
+DOC
+MAP
=VAL :k
+MAP {}
invalid_correct
stdin:2:1: error: wrongly indented flow mapping
k
^
invalid_correct
Parse error: did not find expected ',' or '}'
+STR
+DOC
+MAP
=VAL :k
+MAP {}
=VAL :k
=VAL :
invalid_correct
Exception:
yaml-cpp: error at line 2, column 1: end of map flow not found
+STR
+DOC
+MAP
=VAL :k
+MAP {}
=VAL :
=VAL :
invalid_correct
Unhandled exception. System.Exception: Exception of type 'System.Exception' was thrown.
at YamlDotNet.Core.Scanner.ScanPlainScalar(Boolean& isMultiline)
at YamlDotNet.Core.Scanner.FetchPlainScalar()
at YamlDotNet.Core.Scanner.FetchNextToken()
at YamlDotNet.Core.Scanner.FetchMoreTokens()
at YamlDotNet.Core.Scanner.MoveNextWithoutConsuming()
at YamlDotNet.Core.Parser.GetCurrentToken()
at YamlDotNet.Core.Parser.ParseFlowMappingKey(Boolean isFirst)
at YamlDotNet.Core.Parser.StateMachine()
at YamlDotNet.Core.Parser.MoveNext()
at YamlDotNet.RepresentationModel.LibYamlEventStream.WriteTo(TextWriter textWriter)
at Program.Main(String[] commandLineArguments)
Aborted (core dumped)
+STR
+DOC
+MAP
=VAL :k
+MAP
invalid_correct
Unhandled exception. YamlDotNet.Core.YamlException: (Line: 1, Col: 4, Idx: 3) - (Line: 1, Col: 4, Idx: 3): Exception during deserialization
---> System.Exception: Exception of type 'System.Exception' was thrown.
at YamlDotNet.Core.Scanner.ScanPlainScalar(Boolean& isMultiline)
at YamlDotNet.Core.Scanner.FetchPlainScalar()
at YamlDotNet.Core.Scanner.FetchNextToken()
at YamlDotNet.Core.Scanner.FetchMoreTokens()
at YamlDotNet.Core.Scanner.MoveNextWithoutConsuming()
at YamlDotNet.Core.Parser.GetCurrentToken()
at YamlDotNet.Core.Parser.ParseFlowMappingKey(Boolean isFirst)
at YamlDotNet.Core.Parser.StateMachine()
at YamlDotNet.Core.Parser.MoveNext()
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.DeserializeHelper(Type tKey, Type tValue, IParser parser, Func`3 nestedObjectDeserializer, IDictionary result)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
--- End of inner exception stack trace ---
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.DeserializeHelper(Type tKey, Type tValue, IParser parser, Func`3 nestedObjectDeserializer, IDictionary result)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input)
at Program.Main(String[] commandLineArguments)
Aborted (core dumped)
invalid_correct
yaml: line 2: did not find expected ',' or '}'
invalid_correct
Parsing error near byte offset Pos {posByteOffset = 4, posCharOffset = 4, posLine = 1, posColumn = 4} (Unexpected '
')
+STR
+DOC
+MAP
=VAL :k
+MAP {}
-MAP
invalid_correct
hsyaml-parser: user error (Unexpected '
')
invalid_correct
/node/node_modules/js-yaml/lib/loader.js:187
throw generateError(state, message);
^
YAMLException: missed comma between flow collection entries (3:1)
1 | k: {
2 | k
3 | :
-----^
4 | v
5 | }
at generateError (/node/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/node/node_modules/js-yaml/lib/loader.js:187:9)
at readFlowCollection (/node/node_modules/js-yaml/lib/loader.js:758:7)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1442:11)
at readBlockMapping (/node/node_modules/js-yaml/lib/loader.js:1164:11)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1441:12)
at readDocument (/node/node_modules/js-yaml/lib/loader.js:1625:3)
at loadDocuments (/node/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.loadAll (/node/node_modules/js-yaml/lib/loader.js:1701:19)
at Object.<anonymous> (/yaml/bin/js-jsyaml-json:7:13) {
reason: 'missed comma between flow collection entries',
mark: {
name: null,
buffer: 'k: {\nk\n:\nv\n}\n',
position: 7,
line: 2,
column: 0,
snippet: ' 1 | k: {\n 2 | k\n 3 | :\n-----^\n 4 | v\n 5 | }'
}
}
Node.js v20.13.1
invalid_correct
Flow map in block collection must be sufficiently indented and end with a } at line 2, column 1:
k: {
k
^
+STR
+DOC
+MAP
=VAL :k
+MAP {}
-MAP
invalid_correct
/yaml/bin/js-yaml-json:9
if (doc.errors.length !== 0) throw doc.errors[0]
^
YAMLParseError: Flow map in block collection must be sufficiently indented and end with a } at line 2, column 1:
k: {
k
^
at Composer.onError (/node/node_modules/yaml/dist/compose/composer.js:69:34)
at Object.resolveFlowCollection (/node/node_modules/yaml/dist/compose/resolve-flow-collection.js:183:9)
at resolveCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:16:37)
at Object.composeCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:47:16)
at composeNode (/node/node_modules/yaml/dist/compose/compose-node.js:31:38)
at Object.resolveBlockMap (/node/node_modules/yaml/dist/compose/resolve-block-map.js:83:19)
at resolveCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:13:27)
at Object.composeCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:47:16)
at Object.composeNode (/node/node_modules/yaml/dist/compose/compose-node.js:31:38)
at Object.composeDoc (/node/node_modules/yaml/dist/compose/compose-doc.js:34:23) {
code: 'BAD_INDENT',
pos: [ 5, 6 ],
linePos: [ { line: 2, col: 1 }, { line: 2, col: 2 } ]
}
Node.js v20.13.1
invalid_correct
luajit: 3:1: did not find expected ',' or '}'
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:306: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
/usr/local/share/lua/5.1/lyaml/init.lua:443: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:340: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:378: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:497: in function 'load'
/yaml/bin/lua-lyaml-json:6: in main chunk
[C]: at 0x55823b42eed0
invalid_correct
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(99) next
/tmp/NimYAML-0.16.0/yaml/parser.nim(160) :anonymous
/tmp/NimYAML-0.16.0/yaml/parser.nim(470) atBlockIndentationProps
/tmp/NimYAML-0.16.0/yaml/stream.nim(106) next
[[reraised from:
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(101) next
]]
Error: unhandled exception: Too few indentation spaces (must surpass surrounding block level) [YamlStreamError]
+STR
+DOC
+MAP
=VAL :k
invalid_correct
Line : 2
Column : 1
Message : Bad indendation in FLOWMAP
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 199
YAML : "k\n"
at /yaml/bin/perl-pp-event line 46.
+STR
+DOC
+MAP
=VAL :k
+MAP {}
invalid_correct
Line : 2
Column : 1
Message : Bad indendation in FLOWMAP
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 199
YAML : "k\n"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
invalid_correct
Line : 2
Column : 1
Message : Bad indendation in FLOWMAP
Where : /perl5/lib/perl5/YAML/PP/Parser.pm line 199
YAML : "k\n"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
invalid_correct
YAML::PP::LibYAML Error: The problem:
did not find expected ',' or '}'
was found at , line: 3, column: 1
while parsing a flow mapping at line: 1, column: 4
invalid_correct
YAML::PP::LibYAML Error: The problem:
did not find expected ',' or '}'
was found at , line: 3, column: 1
while parsing a flow mapping at line: 1, column: 4
invalid_correct
Parser finished before end of input at /perl5/lib/perl5/YAML/Parser.pm line 4056, <> line 1.
invalid_correct
YAML::Tiny failed to classify line 'k' at /yaml/bin/perl-tiny-json line 12.
invalid_correct
YAML::Tiny failed to classify line 'k' at /yaml/bin/perl-tiny-perl line 15.
invalid_correct
YAML::XS::Load Error: The problem:
did not find expected ',' or '}'
was found at document: 1, line: 3, column: 1
while parsing a flow mapping at line: 1, column: 4
invalid_correct
YAML::XS::Load Error: The problem:
did not find expected ',' or '}'
was found at document: 1, line: 3, column: 1
while parsing a flow mapping at line: 1, column: 4
invalid_correct
YAML Error: Can't parse inline map
Code: YAML_PARSE_ERR_INLINE_MAP
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 522.
invalid_correct
YAML Error: Can't parse inline map
Code: YAML_PARSE_ERR_INLINE_MAP
Line: 2
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 522.
invalid_correct
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-event", line 7, in <module>
for event in yaml.parse(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 75, in parse
while loader.check_event():
^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 549, in parse_flow_mapping_key
raise ParserError("while parsing a flow mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^
+STR
+DOC
+MAP
=VAL :k
+MAP {}
=VAL :k
=VAL :
invalid_correct
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/composer.py", line 27, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 549, in parse_flow_mapping_key
raise ParserError("while parsing a flow mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^
invalid_correct
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/composer.py", line 27, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 549, in parse_flow_mapping_key
raise ParserError("while parsing a flow mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^
invalid_correct
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-event", line 9, in <module>
for event in yaml.parse(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 371, in parse
while parser.check_event():
^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 747, in parse_flow_mapping_key
raise ParserError(
ruamel.yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^ (line: 1)
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^ (line: 3)
+STR
+DOC
+MAP
=VAL :k
+MAP {}
=VAL :k
=VAL :
invalid_correct
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/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 204, in compose_mapping_node
while not self.parser.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 747, in parse_flow_mapping_key
raise ParserError(
ruamel.yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^ (line: 1)
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^ (line: 3)
invalid_correct
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/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 204, in compose_mapping_node
while not self.parser.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 747, in parse_flow_mapping_key
raise ParserError(
ruamel.yaml.parser.ParserError: while parsing a flow mapping
in "<unicode string>", line 1, column 4:
k: {
^ (line: 1)
expected ',' or '}', but got ':'
in "<unicode string>", line 3, column 1:
:
^ (line: 3)
invalid_correct
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): did not find expected ',' or '}' while parsing a flow mapping at line 1 column 4 (Psych::SyntaxError)
from /ruby/gems/psych/lib/psych.rb:458:in `parse_stream'
from /ruby/gems/psych/lib/psych.rb:632:in `load_stream'
from /yaml/bin/ruby-psych-json:6:in `<main>'
invalid_correct
Error: ScanError { mark: Marker { index: 7, line: 3, col: 0 }, info: "simple key expect ':'" }
+STR
+DOC
+MAP
=VAL :k
+MAP