-
Notifications
You must be signed in to change notification settings - Fork 8
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
Merge breaks when merging a node with a sequence. #36
Comments
That's expected behaviour. Merge keys only work for hashes. |
https://yaml.org/type/merge.html
So an array of scalars can't be merge? That would be nice if it was possible. |
here the "value associated with the merge key" is already a sequence. But the actual nodes in that sequence have to be mappings. There are ideas how to make that possible in the next YAML version. |
Ah, that sequence.. |
See https://metacpan.org/pod/YAML::LoadBundle for ideas.. |
I was rather thinking about using tags. The merge key for mappings is also basically a tag, it's just implicit. Something like:
Since YAML has tags, there's no need to use special named scalars and structures. Edit: but yeah, options like deep merge for hashes and so on would also be nice. |
Yeah I believe our LoadBundle pre-dates the |
Given a node that is a sequence
I get the following error:
Works for node that are hashes.
The text was updated successfully, but these errors were encountered: