bruno
bruno copied to clipboard
JSON String containing a number is sent as a number, not a string
I have checked the following:
- [X] I use the newest version of bruno.
- [X] I've searched existing issues and found nothing related to my issue.
Describe the bug
If the body type is set to JSON and a JSON String containing a number is entered then it will be converted to a JSON Number before being sent.
.bru file to reproduce the bug
No response
Screenshots/Live demo link
This screenshot shows the result of hitting an endpoint that reflects the received bytes exactly.
Something similar happens to me. If I send any number bigger than 15 digits (including .
) it will convert it to a string
I would like to take a look at this issue. Can I pick it up?
My case: a) converted from number to string, and rejected by my used server as 'wrong type':
"lat": 53.07705961249196,
"lng": -1.1654971750050664,
b) not converted, works as number, all good
"position": {
"lat": 51.6552,
"lng": -0.3471,
related to #2438 I believe. The JSON parser that is being used seems less than ideal.
related to #2438 I believe. The JSON parser that is being used seems less than ideal.
Yeah, JSONBigint
does some weird conversions. I think we should switch to lossless-json
. I already used and in my Fork: https://github.com/Its-treason/bruno and it never had such issues.
This has been fixed as a part of PR https://github.com/usebruno/bruno/pull/2773, and will go out in the v1.27.0 release.