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

Validate mapping key uniqueness #1221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brondani
Copy link

@brondani brondani commented Sep 1, 2023

According to YAML spec 1.2.2:

The content of a mapping node is an unordered set of key/value node pairs, with the restriction that each of the keys is unique.

The changes proposed here check the uniqueness of scalar mapping keys, throwing a NonUniqueMapKey exception when by inserting a new key/value pair an identical scalar key is already present in a mapping. Non identical but equivalent scalar content, for example “0o13” (octal) or “0xB” (hexadecimal), are not considered.

Address #60.

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

Successfully merging this pull request may close these issues.

1 participant