Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

apply_merge doesn't merge recursively #362

Open
victordidenko opened this issue Mar 21, 2023 · 0 comments
Open

apply_merge doesn't merge recursively #362

victordidenko opened this issue Mar 21, 2023 · 0 comments

Comments

@victordidenko
Copy link

let yaml_string = "\
a: &a
  a: a
b: &b
  <<: *a
c:
  - <<: *a
  - <<: *b
";
let mut yaml: serde_yaml::Value = serde_yaml::from_str(yaml_string).unwrap();
yaml.apply_merge().unwrap();
println!("{}", serde_yaml::to_string(&yaml).unwrap());

outputs

a:
  a: a
b:
  a: a
c:
- a: a
- <<:
    a: a

while it should be

a:
  a: a
b:
  a: a
c:
- a: a
- a: a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant