yaml-cpp
yaml-cpp copied to clipboard
Adding support for handling YAML Merge Key (#41)
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.
I tested this PR and it appears to work as expected for my project. Thanks for the contribution, @nlescoua !