mapstructure icon indicating copy to clipboard operation
mapstructure copied to clipboard

Go library for decoding generic map values into native Go structures and vice versa.

Results 84 mapstructure issues
Sort by recently updated
recently updated
newest added

This proposal allows for custom decoding on type interface level. The main motivation to create this PR is possibility to change some values based on different decoders and does it...

Thanks for this project, I've had a config file merge and load implementation using this project, and got a wired problem: https://github.com/sandwich-go/xconf/issues/6 https://github.com/mitchellh/mapstructure/blob/b9b99d7d59762a5b2a43df840adc318b2fa229ee/mapstructure.go#L823-L830 Should `decodeMapFromSlice` ignore `ZeroFields` when `i !=...

slice converted to single value if len(slice) == 1

This change keeps pointers and interfaces returned by hook, when that pointers and interfaces must exist in multiple places in the resulting decoded value. Intended to use when hook looks...

Allows the user to see if a a struct has not been populated fully. In my project, I need a one to one mapping between the map and my struct,...

`decodeMapFromSlice()` doesn't accumulate errors in a loop in a manner similar to `decodeMapFromMap()`. I don't see why there should be a semantic difference between these two functions.

bug

Thank you for this project, I am looking for verification on an assumption I have when it comes to the `omitempty` flag in mapstructure. **Assumption:** I expect any property that...

bug

https://github.com/mitchellh/mapstructure/blob/4664f9ee512b4dfa71b501c4960d469c205b2cf1/mapstructure.go#L657 Should be `val.SetUint(uint64(int64(f)))`, because https://golang.org/ref/spec#Conversions says: > In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the...