Plain scalars with colons in flow sequences/mappings are valid YAML

Issue #397 resolved
Jonathan Stoikovitch created an issue

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)

  1. Andrey Somov

    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".

  2. Jonathan Stoikovitch 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? ...

  3. Andrey Somov
    1. My comment in PyYAML -> silence
    2. 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.

  4. Jonathan Stoikovitch 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".

  5. Andrey Somov

    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)

  6. Log in to comment