Decode(map[string]interface{})#9
Conversation
|
Thanks @magiconair, I have removed I am not looking to add Interface as a value type, my naive decoder is indifferent to the values. My goal is to create a map of maps, so that the parsed properties are easier to iterate over and manipulate. This way properties can be read without requiring a predefined Struct. This is the same behavior supported by the decoders for other formats. |
|
The current |
|
The change in the current form would create the situation that decoding to |
|
I can live with the fact that Some things I've stumbled upon:
|
Add feature to Decode/Unmarshal configuration into a
map[string]interface{}.This functionality is available in HCL, JSON, YAML and TOML decoders, as we can see in Viper. This change enables Viper to Unmarshal dot-separated values from a
.propertiesfile into a nested Struct or Map.