code: func decodeJSON(out interface{}, body io.ReadCloser) error {
  	defer body.Close()
  
  	var parsed interface{}
  	dec := json.NewDecoder(body)
  	if err := dec.Decode(&parsed); err != nil {
  		return err
  	}
  
  	decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
  		DecodeHook: mapstructure.ComposeDecodeHookFunc(
  			mapToHTTPHeaderHookFunc(),
  			stringToTimeHookFunc(),
  		),
  		WeaklyTypedInput: true,
  		Result:           out,
  	})
  	if err != nil {
  		return err
  	}
  	return decoder.Decode(parsed)
  }
docs: // decodeJSON is used to decode an HTTP response body into an interface as JSON.