mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 00:25:56 +03:00
[GH-ISSUE #1782] JSON float round #1776
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1776
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yaroslavyaroslav on GitHub (Sep 26, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1782
Originally assigned to: @NghiaTranUIT on GitHub.
Description
Proxyman rounds float values on JSON to 2 numbers in a fraction part. It's kinda confusing, thus it's unexpected that values of a response/request would be modified instead of just being formatted.
Steps to Reproduce
Current Behavior
In body tab
amountfield would be shown as99999.01Expected Behavior
To show in body tab exact number as it's stored within raw data.
Environment
@NghiaTranUIT commented on GitHub (Sep 26, 2023):
Do you use Scripting or other tools that modify the value ? By default, Proxyman only proxies the data without modifying any actual data.
@yaroslavyaroslav commented on GitHub (Sep 26, 2023):
Nope, it's the actual case. I mean the very same response presented in
rawtab in its full size as99999.009999999, but in body size it's not and it's rounded to 2 numbers in a fraction part.Ps: at first I was meant to write this issue as a question, but I've checked raw tab right before publication, and saw that there's unmodified value presented.
@NghiaTranUIT commented on GitHub (Sep 26, 2023):
Just wondering: Does this issue affect your actual Request/Response on your server-side ? Or just a display issue on the Body Tab 🤔
@yaroslavyaroslav commented on GitHub (Sep 26, 2023):
It affects, that's how I faced it - I've got a server error that the fractional part are way too long in my request, and that I was struggling to understand why two decimal after a point is too much for it.
@invisible-debug commented on GitHub (Jun 27, 2024):
Also relevant for me. The request is sent correctly to the backend. But the Proxyman does not display correctly. Because of this, it is impossible to debug traffic. It creates a false impression that the bug is on the backend.
Charles displays this correctly
@NghiaTranUIT commented on GitHub (Jun 27, 2024):
May I ask: @invisible-debug can you see the bug in the Raw Tab?
and do you use any debugging tool?
From what I know, the body and Raw Tab always displays the raw data, except using breakpoint, Map local, or Scripting -> It might change the floating number.
@invisible-debug commented on GitHub (Jun 27, 2024):
Oh. Raw tab displays correctly, my friend @NghiaTranUIT . Error is displays only on the Body tab

I don't use any debugging tool. Using Postman + Proxyman (5.0.0). And request not edited. This can be seen in the screenshot. There is no check mark in the Edited column.
I attach a screenshot with the original request in Postman and incorrectly displayed in Proxyman
Same thing in Raw tab:

@NghiaTranUIT commented on GitHub (Jun 27, 2024):
thanks @invisible-debug I'm able to reproduce this bug. Let me fix it and send a hotfix asap 👍
@invisible-debug commented on GitHub (Jun 27, 2024):
@NghiaTranUIT We have some bureaucratic problems with paying for the license. Will I not be able to get this fix if my subscription expires?
@NghiaTranUIT commented on GitHub (Jun 27, 2024):
Preliminary investigation shows that it's because our JSON Lib (nlohmann/json) doesn't support big numbers by default. I'm going to find a new solution to fix it
@NghiaTranUIT commented on GitHub (Jun 28, 2024):
@invisible-debug let's try this Beta build: https://download.proxyman.io/beta/Proxyman_5.5.0_Try_to_fix_JSON_big_number.dmg
@invisible-debug commented on GitHub (Jun 28, 2024):
Yes, I checked it out. This really solves the problem. Thanks!

@NghiaTranUIT commented on GitHub (Jun 28, 2024):
Awesome, I will write some Unit Tests and release it in the next update 👍