[GH-ISSUE #398] [BUG] JSON Body parser causes missing large number #399

Open
opened 2026-03-03 19:50:24 +03:00 by kerem · 0 comments
Owner

Originally created by @NghiaTranUIT on GitHub (Apr 9, 2024).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/398

Originally assigned to: @kics223w1 on GitHub.

Description

JSON Body parser causes missing large number

Steps to Reproduce

  1. Make a POST with this body:
{
	"big_number": 1655989280365,
	"super_big": 165598928036513123123,
	"null": null,
	"int_numbers": [
		1,
		2,
		3,
		4,
		16559892803651312312311122
	],
	"float_numbers": [
		1.2,
		2.2,
		3.03,
		4.004,
		165598928036513123123.0000165598928036513123123,
		0.123000000000000005123
	],
	"name": "Proxyman",
	"small": 123456,
	"float": 500000.20004,
	"float_2": 200.001,
	"boolean": true,
	"boolean_false": false,
	"complex": [
		{
			"big_number": 1655989280365,
			"super_big": 165598928036513123123,
			"null": null,
			"int_numbers": [
				1,
				2,
				3,
				4
			],
			"float_numbers": [
				1.2,
				2.2,
				3.03,
				4.004
			],
			"name": "Proxyman",
			"small": 123456,
			"float": 500000.20004,
			"float_2": 200.001,
			"boolean": true,
			"boolean_false": false
		}
	]
}
  1. See on Proxyman Windows

Current Behavior

  • all bug numbers are lost
  • Request Tab:
{
  "big_number": 1655989280365,
  "super_big": 165598928036513120000,
  "null": null,
  "int_numbers": [
    1,
    2,
    3,
    4,
    1.6559892803651313e+25
  ],
  "float_numbers": [
    1.2,
    2.2,
    3.03,
    4.004,
    165598928036513120000,
    0.123
  ],
  "name": "Proxyman",
  "small": 123456,
  "float": 500000.20004,
  "float_2": 200.001,
  "boolean": true,
  "boolean_false": false,
  "complex": [
    {
      "big_number": 1655989280365,
      "super_big": 165598928036513120000,
      "null": null,
      "int_numbers": [
        1,
        2,
        3,
        4
      ],
      "float_numbers": [
        1.2,
        2.2,
        3.03,
        4.004
      ],
      "name": "Proxyman",
      "small": 123456,
      "float": 500000.20004,
      "float_2": 200.001,
      "boolean": true,
      "boolean_false": false
    }
  ]
}
  • Response is wrong too, because the request is changed

Expected Behavior

  • Have the same Request/Response that when we don't use Proxyman
  • Big numbers are unchanged
  • Use this lib: https://www.npmjs.com/package/lossless-json
  • Verify it's working and doesn't break current logic: Space, font, ...
  • Write Unit Test for this case

Environment

  • App version:
  • Windows/Linux version:
Originally created by @NghiaTranUIT on GitHub (Apr 9, 2024). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/398 Originally assigned to: @kics223w1 on GitHub. ## Description JSON Body parser causes missing large number ## Steps to Reproduce 1. Make a POST with this body: ``` { "big_number": 1655989280365, "super_big": 165598928036513123123, "null": null, "int_numbers": [ 1, 2, 3, 4, 16559892803651312312311122 ], "float_numbers": [ 1.2, 2.2, 3.03, 4.004, 165598928036513123123.0000165598928036513123123, 0.123000000000000005123 ], "name": "Proxyman", "small": 123456, "float": 500000.20004, "float_2": 200.001, "boolean": true, "boolean_false": false, "complex": [ { "big_number": 1655989280365, "super_big": 165598928036513123123, "null": null, "int_numbers": [ 1, 2, 3, 4 ], "float_numbers": [ 1.2, 2.2, 3.03, 4.004 ], "name": "Proxyman", "small": 123456, "float": 500000.20004, "float_2": 200.001, "boolean": true, "boolean_false": false } ] } ``` 3. See on Proxyman Windows ## Current Behavior - all bug numbers are lost - Request Tab: ``` { "big_number": 1655989280365, "super_big": 165598928036513120000, "null": null, "int_numbers": [ 1, 2, 3, 4, 1.6559892803651313e+25 ], "float_numbers": [ 1.2, 2.2, 3.03, 4.004, 165598928036513120000, 0.123 ], "name": "Proxyman", "small": 123456, "float": 500000.20004, "float_2": 200.001, "boolean": true, "boolean_false": false, "complex": [ { "big_number": 1655989280365, "super_big": 165598928036513120000, "null": null, "int_numbers": [ 1, 2, 3, 4 ], "float_numbers": [ 1.2, 2.2, 3.03, 4.004 ], "name": "Proxyman", "small": 123456, "float": 500000.20004, "float_2": 200.001, "boolean": true, "boolean_false": false } ] } ``` - Response is wrong too, because the request is changed ## Expected Behavior - [x] Have the same Request/Response that when we don't use Proxyman - [x] Big numbers are unchanged - [x] Use this lib: https://www.npmjs.com/package/lossless-json - [x] Verify it's working and doesn't break current logic: Space, font, ... - [x] Write Unit Test for this case ## Environment - App version: - Windows/Linux version:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxyman-windows-linux#399
No description provided.