mapstructure
mapstructure copied to clipboard
Go library for decoding generic map values into native Go structures and vice versa.
#205 already support squash embedded struct pointers, but I want to change config of `Decoder` to enable it by default. Currently we have `Squash` option but only work on embedded...
Hello, When decoding a struct to a map custom DecodeHooks are not called for non struct fields. This originates from line 975 in mapstructure.go where fields valued are just copied...
Hi there, I'm currently using mapstructure for an API, to convert a `map[string]interface{}` extracted from user inputs into a structure. The main use-case is working very well, however I would...
If input is zero, add and option to skip the `outVal.Set(reflect.Zero(outVal.Type()))` https://github.com/mitchellh/mapstructure/blob/95075d6e1a88d608e5258a054d7f0de9401f255e/mapstructure.go#L403-L411 If this is acceptable, I can make a pr
First of all, thanks for this great package! It's really useful in many scenarios, one of which is unmarshaling configuration in [Viper](https://github.com/spf13/viper). We are dealing with a problem in Viper...
The example below prints: ```bash map[V1:v1 M2:map[V2:v2]] V1 v1 M2 map[V2:v2] [VS1_1 VS1_2] VS1_1 VS1_2 [map[VMS:vms]] map[VMS:vms] ``` The first `map[string]interface{}` is traversed, but the last (`map[V2:v2]`) seems to be...
I have a field in my JSON that looks like this `AllowedOAuthFlowsUserPoolClient: true` which I want to map to this field `AllowedOAuthFlowsUserPoolClient *bool `type:"boolean"`` This gives me the error `*...
When you want to convert from `map[string]interface{}` to `map[string]interface{}` you don't have a lot of type information to identify a sensible type conversion. I want to serialize some maps as...
I realized today that `Decode` does not zero the destination variable before decoding the value into it. Is this expected; or is this a bug? Example: ``` var rec r.ChangeResponse...