Open gniqizeuy opened 5 months ago
Hi @gniqizeuy, thanks for the report. This is indeed a bug. We shouldn’t alter the displayed data. For what it’s worth, you can always use the “Raw” body view mode to see the response body as provided by the server:
Background: JSON doesn’t really support int64. We currently use JSON.stringify()
under the hood to prettify the body, which means we parse the data, and JS alters the unsafe integer value.
Number.isSafeInteger(68164106661659011) // → false
A simple test: add the following to the request body JSON editor and invoke “Prettify”:
{
"foo": 68164106661659011
}
We need to prevent this alteration. Ideally, we’d also warn the user when unsafe integers appear in the request/response JSON.
What happened?
diff response about json int64 field
request
response
in chrome
diff id in list filed
id in db is same as response frome chrome not the httpie response
Steps to reproduce?
What did you expect to happen?
show correct int64 value
Platform
macOS
HTTPie Desktop version
2024.1.2
Relevant log output
No response
Code of Conduct