-
-
Notifications
You must be signed in to change notification settings - Fork 768
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
Bypass duplicated mapping key ? #345
Comments
No way. Duplicated keys are not allowed both in json and yaml. |
Thanks for answering that fast, what I meant, if it wasn't clear was to have one key at the end with the last valor given (as http://www.yamllint.com/ do). |
I can't comment that site. May be it has reasons to not follow spec. But we checked carefully, prior to add throwing error for duplicated keys. |
Ok thanks, I understand |
@puzrin By any chance, would you be open to reevaluate this? We're using In our case it's not a big deal (it's best effort recovery, and both entries contain the same data anyway), but the lack of option to signal to js-yaml that it should just ignore the problem means that we sometimes have to throw pretty annoying errors:
When that happens, there's no other choice for the user than remove the lockfile, and lose all their current locked resolutions. It's not a great experience 🙁 |
@arcanis ok, create a new issue with this details please. Need to think. |
When loading a YAML file with a duplicate key, I got this message error.
Is there a way to bypass this error and take the last value input, here, to have duplicate as true ?
The text was updated successfully, but these errors were encountered: