I want to merge two YAML files into one, in such a way that it would avoid duplicates and merge the attributes. As an example, having two yaml files as presented below:
yaml1:
first_name: "John"
last_name: "Smith"
enabled: false
roles:
- user
yaml2:
enabled: true
roles:
- user
- admin
I would expect the following result:
first_name: "John"
last_name: "Smith"
enabled: true
roles:
- user
- admin
So far I was able to do it converting YAML to JSON and using this example, however, I wanted to know a way using the C# YAML libraries (like yamldotnet and SharpYaml).