Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bruno converts decimal numbers in JSON body to strings #2438

Open
2 tasks done
mrtnbrst opened this issue Jun 11, 2024 · 3 comments
Open
2 tasks done

Bruno converts decimal numbers in JSON body to strings #2438

mrtnbrst opened this issue Jun 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mrtnbrst
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

Bruno converts decimal numbers in JSON to strings as visible in the screenshot.

.bru file to reproduce the bug

example.json

Screenshots/Live demo link

image

@mrtnbrst mrtnbrst added the bug Something isn't working label Jun 11, 2024
@mrtnbrst
Copy link
Author

The attached file is a .bru file, but those are not allowed to be uploaded, so I changed the file extension.

@jwetzell
Copy link
Contributor

Seems to be an issue with "long" decimals as not all of the decimals in your example got converted to strings.

@jwetzell
Copy link
Contributor

The problem is this line here for someone looking to fix this. It is using a library to parse the JSON but that library is converting these long decimals into "BigNumber" type. @sanjai0py is the one who added this BigNumber parsing in so might be able to speak to the reasoning or if this side-effect was not known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants