Skip to content
Bug reportAug 27, 2026· 0:50· 18 views

Hoppscotch: Snowflake-style integers (>2^53) silently corrupted in generated cURL command

0:50 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

mediumcode-generation
os: macOSbrowser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Navigate to Hoppscotch request builder
  2. 2.Enter a request URL (e.g., https://api.example.com/items)
  3. 3.Switch to the 'Body' tab and select Content Type 'application/json'
  4. 4.Input a JSON body containing integers larger than 2^53 (e.g. {"consIds": [154284075601887489, 160768022762487810]})
  5. 5.Click the Send options dropdown and select 'Show code'
  6. 6.Inspect the generated cURL command payload in the 'Generate code' modal

Expected

The generated cURL code snippet preserves the exact JSON raw body string without altering 64-bit integer precision (e.g., [154284075601887489, 160768022762487810]).

Actual

Large integers exceeding Number.MAX_SAFE_INTEGER are parsed into standard JavaScript floats/numbers and re-serialized, corrupting the values to [154284075601887500, 160768022762487800].

Evidence

visualRaw Request Body in editor displays {"consIds": [154284075601887489, 160768022762487810]}
visualGenerate code modal displays corrupted payload in cURL: --data '{"consIds": [154284075601887500, 160768022762487800]}'
Issue markdown (copy-paste ready)
### Description
When generating code snippets (such as Shell - cURL) from a request with an `application/json` raw body, integer values exceeding JavaScript's safe integer limit (`Number.MAX_SAFE_INTEGER` / `2^53 - 1`) are parsed with standard `JSON.parse` or numeric conversion, causing IEEE 754 precision loss and corrupting 64-bit/snowflake IDs.

### Steps to Reproduce
1. Open Hoppscotch (0.0s).
2. Set request URL to `https://api.example.com/items` (4.6s).
3. Switch to **Body** tab and choose **application/json** (11.2s - 15.0s).
4. In the raw JSON body editor, enter:
   ```json
   {"consIds": [154284075601887489, 160768022762487810]}
   ```
   (21.0s - 25.0s).
5. Click the Send dropdown menu and select **Show code** (27.4s - 30.1s).
6. View the generated cURL command (33.0s).

### Expected Result
The generated code snippet should preserve the raw string representation of the body without numeric precision loss:
`--data '{"consIds": [154284075601887489, 160768022762487810]}'`

### Actual Result
The numbers are rounded upon code generation:
`--data '{"consIds": [154284075601887500, 160768022762487800]}'`

*Recorded with SceneRecap.*

This report was written by SceneRecap from a screen recording. Try SceneRecap free

Turn a screen recording into a bug report like this one.

Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.

Try SceneRecap free →