-
Notifications
You must be signed in to change notification settings - Fork 63
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
Tests with repeated keys should be marked as errors #25
Comments
Also test PW8X has repeated empty/null keys. |
X38W also has an alias referring to another key in the same map. |
Thanks. The parser can't (always) know if keys are considered equal or not. For example:
Therefor, the constructor/schema has to define equality. We still haven't decided how to mark loader/constructor errors; maybe with tags like |
Explicitly specifying the core schema for the tests sounds like a Good Idea; with that answering the equality of each of the above examples becomes straightforward:
|
As an update, this is still an issue with the tests 2JQS and PW8X due to their repeated empty/null keys. |
Test E76Z is also still broken. This test uses an alias to an anchored key, so the key must be unambiguously the same by definition. However, since that test does test specific functionality and should therefore not just be marked as erroneous, therefore I'd suggest to change it like this: --- in-yaml
&a a: &b b
*b : *a
--- in-json
{
"a": "b",
"b": "a"
} |
I marked the test with a |
Specifically, 2JQS has repeated empty keys and E76Z has an alias referring to another key in the same map. These are both errors, as the spec requires mapping keys to be unique.
The text was updated successfully, but these errors were encountered: