normalizeAny converts a typed SDK response to an any suitable for writeOK by JSON round-tripping through json.Number-preserving decoder.
(v any)
| 229 | // normalizeAny converts a typed SDK response to an any suitable for writeOK |
| 230 | // by JSON round-tripping through json.Number-preserving decoder. |
| 231 | func normalizeAny(v any) (any, error) { |
| 232 | data, err := json.Marshal(v) |
| 233 | if err != nil { |
| 234 | return nil, err |
| 235 | } |
| 236 | return output.NormalizeJSONNumbers(data) |
| 237 | } |