-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add support for "value associated with the merge key is a sequence" #320
Labels
bug
Something isn't working
Comments
jjkavalam
added a commit
to jjkavalam/yaml
that referenced
this issue
Oct 17, 2021
Merged
jjkavalam
added a commit
to jjkavalam/yaml
that referenced
this issue
Oct 19, 2021
eemeli
pushed a commit
that referenced
this issue
Oct 19, 2021
Nathan-Fenner
pushed a commit
to Nathan-Fenner/yaml
that referenced
this issue
Nov 17, 2021
what is the solution ? js = yaml.parse(doc.toString(),{merge:true})
js1 = doc.toJS {merge:true} I am having to use |
@sourcevault Please open a new discussion for your query, including a complete example of what you're looking to do. |
Hi @eemeli I found the solution. doc.setSchema('1.1')
js = doc.toJS() not sure if this is the expected pattern or workaround. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If the value associated with the merge key is a sequence (rather than a single mapping node), following error is thrown when attempting
doc.toJS()
doc.toJSON()
:To Reproduce
Steps to reproduce the behaviour.
Expected behaviour
When the value associated with the merge key is a sequence, the elements of the sequence must be merged in one by one.
The expected behaviour is described here: https://github.com/eemeli/yaml/blob/master/src/nodes/addPairToJSMap.ts#L54
Versions (please complete the following information):
yaml
: 1.10.0, 2.0.0-8The text was updated successfully, but these errors were encountered: