mapstructure
mapstructure copied to clipboard
Go library for decoding generic map values into native Go structures and vice versa.
add `StringToURLHookFunc` decode hook to support decode string to `url.URL`
Hi there, When I try to convert an embedded slice, if the field name is the same in the slice, but the type is different, every element under the slice...
When decoding a struct containing a string pointer and a struct pointer into a map, the resulting map has a pointer to the string but not a pointer to the...
I have a use case where I need to decode a JSON, where I care only about a few fields, change it here and there, and then serialize it back...
Currently, the errors returned by mapstructure lack of structured details like the namepace and the value which caused them, which are essential to perform any post-decode action aimed to fix...
I defined an alias type `DateTime` for `time.Time`, It mainly implements the `time.DateTime` format `string` and `time.Time` interchange ```go type DateTime time.Time func (d DateTime) MarshalJSON() ([]byte, error) { t...
When using the `DecoderConfig.ErrorUnset` together with `DecoderConfig.IgnoreUntaggedFields` while having a untagged field results in an error, as the field remains unset. The test https://github.com/pulledtim/mapstructure/commit/64dc62a5d0b5ac68b6e467898727fb0629d10945 fails with `* '' has unset...
I don't know how it names properly, but what I mean is: ``` type MyString string ``` How I hit on the problem is with [json.Decoder](https://pkg.go.dev/encoding/json#Decoder) and [UseNumber](https://pkg.go.dev/encoding/json#Decoder.UseNumber). It marshals...
When using custom hooks and calling multiple decode functions, error output is not really human readable: ``` 19 error(s) decoding: * '' has invalid keys: log * cannot parse 'transport.disable_compression'...