decodeBody decodes a JSON body, keeping numbers exact.
(body []byte)
| 230 | |
| 231 | // decodeBody decodes a JSON body, keeping numbers exact. |
| 232 | func decodeBody(body []byte) (any, error) { |
| 233 | var v any |
| 234 | if err := decodeJSON(bytes.TrimSpace(body), &v); err != nil { |
| 235 | return nil, err |
| 236 | } |
| 237 | return v, nil |
| 238 | } |
| 239 | |
| 240 | // describeJSON names the kind of a decoded JSON value for messages. |
| 241 | func describeJSON(v any) string { |
no test coverage detected