Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SemanticErrorException on valid YAML #949

Closed
patrikbeno opened this issue Aug 4, 2024 · 1 comment
Closed

SemanticErrorException on valid YAML #949

patrikbeno opened this issue Aug 4, 2024 · 1 comment

Comments

@patrikbeno
Copy link

patrikbeno commented Aug 4, 2024

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

@EdwardCooke
Copy link
Collaborator

This fix will go out in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants