Use json.Number when unmarshaling into the response map
This commit is contained in:
1 parent
eb88d0381a
commit
77bcee1861
1 file changed
+1
@@ -54,6 +54,7 @@ func (r *Response) Decode(inStruct interface{}) (*Error, error) {
|
||||
if r.Body.Len() > 0 {
|
||||
reader := bytes.NewReader(r.Body.Bytes())
|
||||
dec := json.NewDecoder(reader)
|
||||
dec.UseNumber()
|
||||
if r.resp.StatusCode >= 400 {
|
||||
inStruct = apiErr
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user