Plain scalars with colons in flow sequences/mappings are valid YAML
Seems like a very old issue. Now that libyaml
is going to merge this and PyYAML already did. It would be nice to have a consistent behavior across languages. Any plans to address this in snakeyaml
?
Comments (15)
-
-
reporter -
It would be nice if start a discussion in the yaml-core mailing list. I do not see any information there. The PyYAML wiki is not updated: http://pyyaml.org/wiki/YAMLColonInFlowContext
-
I have added my comment to the PyYAML project (I think that the pull request should not have been accepted)
Feel free to help to go forward.
-
You can see the consequence (if we accept it) I find the new way very ugly
-
Dear Jonathan, it looks like nobody wants to discuss the matter. I find the way HOW it was done in PyYAML a mistake. It breaks the spec.
We cannot just repeat the same mistake. We will be overloaded with complains. Look at this:
- {a:1} is 'a:1' -> null
- {a:} is 'a:' -> null
- {a :} is 'a :' -> null
It is not just unexpected, it is simply wrong. If you do not help us to communicate and fix the misunderstanding the issue will not be "fixed".
-
reporter Are you sure nobody want to discuss it. This was just approved in
libyaml
5 days ago so I was under the impression it was moving forward. Is there somewhere else we could discuss this? Maybe Slack? IRC? ... -
- My comment in PyYAML -> silence
- My post in yaml-core mailing list -> silence
How the above mentioned examples are parsed in PyYAML ? Where is the code ? Where are the tests ? The pull request (in PyYAML) contains nothing.
-
reporter Gotcha. I'll try to reach out to some people and will circle back to you. I am sure they must be busy due to the "holidays".
-
Still no reply. The change in libyaml looks very incomplete (no single test is changed!!!). The code is removed without any consequences.
-
reporter There was one additional test added to the yaml-test-suite. But you're right that those edge cases don't have a test. I think this is probably what this comment is about though.
I added a comment. Feel free to join the conversation!
-
To avoid misunderstanding.
The issue is NOT about having test cases. The issue is that the code is broken, but you do not see because there are no test cases. (yeah, these cases are not yet in the test suite because we still have to figure out the correct results :-/)
I do not understand why now (instead of making spec 1.3 or better 2.0) they try to "fix" existing 1.1 I have reverted the change. SnakeYAML will keep the current consistent behavior.
(by the way, there are still no answers to any of my questions)
-
- changed status to on hold
We would like to get the corner cases explained.
-
- changed status to open
Let us discuss the consequences
-
@jstoiko : can you please check if it is what you expect ?
https://bitbucket.org/asomov/snakeyaml/commits/6522407b801a59efbc33b0d1b3bf0e3d6ccd4786
- Log in to comment
Can you please give a link to the change in PyYAML ? I could not find it.