You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like inconsistent behavior and based on https://yaml.org/type/merge.html I believe we should always prefer shallow merge.
Can a flag be added to the parser so that we can choose to ignore deep merge even when parser knows the resulting struct ?
The text was updated successfully, but these errors were encountered:
kansalarchit
changed the title
yaml to json - merge behavior : deep vs shallow merge
yaml to struct - merge behavior : deep vs shallow merge
Feb 16, 2022
This addresses a number of related issues on how merge tags
were handled, most notably the case of nested mappings being
merged instead of the outermost value being used as-is.
Closes: #818#826
It seems like anchor merge behaves differently depending on the golang struct provided.
With a simple golang interface{} object, the conversion results in shallow merge. e.g.:
results in (Shallow Merge)
whereas when we provide a specific golang struct, such as
For the same input, we get: (Deep Merge)
This looks like inconsistent behavior and based on https://yaml.org/type/merge.html I believe we should always prefer shallow merge.
Can a flag be added to the parser so that we can choose to ignore deep merge even when parser knows the resulting struct ?
The text was updated successfully, but these errors were encountered: