YamlDotNet
YamlDotNet copied to clipboard
SemanticErrorException on valid YAML
trafficstars
Error parsing { foo: &foo bar }
var scanner = new Scanner(new StringReader("{ foo: &foo bar }"));
var parser = new Parser(scanner);
while (parser.MoveNext()) {}
YamlDotNet.Core.SemanticErrorException : While parsing a flow mapping, did not find expected ',' or '}'.
at YamlDotNet.Core.Parser.ParseNode(Boolean isBlock, Boolean isIndentlessSequence)
at YamlDotNet.Core.Parser.ParseFlowMappingValue(Boolean isEmpty)
at YamlDotNet.Core.Parser.StateMachine()
at YamlDotNet.Core.Parser.MoveNext()
However, this would be OK: { foo: &foo bar, }. Also this: { foo: bar }
Version 16.0.0