yaml-cpp icon indicating copy to clipboard operation
yaml-cpp copied to clipboard

Adding support for handling YAML Merge Key (#41)

Open nlescoua opened this issue 2 years ago • 1 comments

Support for YAML Merge keys ( <<: [*dict1, *dict2] ) is added. The merge key is a specific scalar with value << (and tag !!merge) that implies that during node construction, the map (or sequence of maps) are merged into the current map. The priority rules are that each key from maps within the value associated with << are added iff the key is not yet present in the current map (and first map gets higher priority). Test cases have been added accordingly.

nlescoua avatar Nov 08 '23 09:11 nlescoua

I tested this PR and it appears to work as expected for my project. Thanks for the contribution, @nlescoua !

bradnelson avatar Jan 08 '24 19:01 bradnelson