You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Hm yes, this is intended and I think would be a breaking change to change the default. By decoding to a map[string]interface{} you are saying that the value interface{} is anything that can be assigned to it. mapstructure realizes that it can decode directly onto there, which I think is arguably correct.
I'd be open to an enhancement that introduces a new option to "prefer maps" basically in this scenario.
If a field is a slice of structs they are not decoded, instead it stays a slice of that type.
Same goes for maps.
See example here.
The text was updated successfully, but these errors were encountered: