bruno icon indicating copy to clipboard operation
bruno copied to clipboard

Long Type Variables in JSON Response Displayed as Integer in Response Tab

Open chachizhu opened this issue 2 years ago • 4 comments

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

I would like to report a bug that I encountered. When the response is in JSON format and contains a variable of type long, the variable is forcibly displayed as an int in the response tab. This results in a loss of precision for large numbers, which can be misleading or problematic when dealing with significant data.

Steps to reproduce:

Send a request that returns a JSON response containing a long type variable. Observe the displayed value in the response tab, where the long variable is converted and displayed as an int. Expected behavior: The long type variable should retain its original format and precision when displayed, without being coerced into an int.

This issue may cause inaccurate data representation, especially for systems where the exact numeric values are critical.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

screenshot1

chachizhu avatar Oct 22 '24 11:10 chachizhu

Hi, I'm experiencing a related issue causing a float to be automatically cast as an int if they are equal. For example here is the downloaded json response from bruno (image 1) and the json displayed directy in bruno (image 2) Screenshot from 2024-10-24 11-17-29 Screenshot from 2024-10-24 11-17-19 This behaviour is misleading i think, it would be better to show the json response, unmodified

Ephtolens avatar Oct 24 '24 09:10 Ephtolens

Hey @chachizhu , Thanks for reporting this issue. I was able to reproduce it on my machine, and I'm coordinating with the dev team to get an estimated timeline for a fix.

@Ephtolens I am using Bruno v1.34.0 and I was not able to reproduce the issue where the 0 got convereted into 0.0 in the downloaded json. Would you mind sharing me a video demonstrating this.

ganesh-bruno avatar Oct 25 '24 12:10 ganesh-bruno

Similar to #3336

While we continue to investigate this and see how this could be resolved, here is a workaround for users facing similar issues - https://docs.usebruno.com/advanced-guides/working-with-bigint

helloanoop avatar Oct 26 '24 19:10 helloanoop

This has been fixed and is live in v2.14.0 🎉 🎉

helloanoop avatar Nov 07 '25 18:11 helloanoop