in reply to duplicate keys in YAML
This is the sample config file:
test1:
abc:
abc:
- sdhfg
test1:
- def
test1:
ghi:
- sdjfhgsdj
- sdgfgsd
ghi:
- rty
- weytr
test2:
- jkl
No i dont have control over the config file. Other users who use my software may have config files with duplicate keys. Such is the case which i want to catch and error out.
The structure is very complex to define and there are lot of config files with lots of keys. So will have to form another hash key values and then loop over each task to find its duplicate. This extra processing can be avoided if YAML or any other config file reader gave error for duplicate keys
|