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

Resolved issue with dropping duplicate keys #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Michaelt293
Copy link
Owner

Makes duplicate keys in a YAML map a parse error.

@SamRoberts
Copy link

This seems fine, although I wouldn't be surprised if the author of moultingyaml wants the user to have the option of passing in a custom LoaderOptions to the parseYaml method.

Have you talked to the author of moultingyaml yet? I am sure he'd be happy to get this functionality merged. :)

@Michaelt293
Copy link
Owner Author

Thanks Sam. Yeah, I did think about whether this should be configurable. I think silently dropping data is rarely a good idea. I'm struggling to think of a situation where a user would want to drop duplicate keys. It would be nice to be able to select the behaviour you want rather than the selection being forced on you.

I haven't contacted the author, will raise a PR soon.

@Michaelt293
Copy link
Owner Author

Raised a PR -jcazevedo#36. I think you are right regarding the author prefering the ability to customise though. We'll see.

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.

2 participants