(t *testing.T)
| 164 | } |
| 165 | |
| 166 | func TestNormalizeJSONNumbers(t *testing.T) { |
| 167 | data := []byte(`{"id": 1234567890123456789}`) |
| 168 | v, err := NormalizeJSONNumbers(data) |
| 169 | if err != nil { |
| 170 | t.Fatal(err) |
| 171 | } |
| 172 | m := v.(map[string]any) |
| 173 | // Should preserve as json.Number, not float64 |
| 174 | if _, ok := m["id"].(json.Number); !ok { |
| 175 | t.Errorf("expected json.Number, got %T", m["id"]) |
| 176 | } |
| 177 | } |
nothing calls this directly
no test coverage detected