MCPcopy Create free account
hub / github.com/basecamp/hey-cli / NormalizeJSONNumbers

Function NormalizeJSONNumbers

internal/output/writer.go:324–332  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

322}
323
324func NormalizeJSONNumbers(data []byte) (any, error) {
325 dec := json.NewDecoder(bytes.NewReader(data))
326 dec.UseNumber()
327 var v any
328 if err := dec.Decode(&v); err != nil {
329 return nil, err
330 }
331 return v, nil
332}

Callers 2

normalizeAnyFunction · 0.92
TestNormalizeJSONNumbersFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNormalizeJSONNumbersFunction · 0.68