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

[BUG] JSON Body parser causes missing large number #398

Open
5 tasks done
NghiaTranUIT opened this issue Apr 9, 2024 · 0 comments
Open
5 tasks done

[BUG] JSON Body parser causes missing large number #398

NghiaTranUIT opened this issue Apr 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working ✅ Done Ticket is resolved

Comments

@NghiaTranUIT
Copy link
Member

NghiaTranUIT commented Apr 9, 2024

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:
@NghiaTranUIT NghiaTranUIT added the bug Something isn't working label Apr 9, 2024
@NghiaTranUIT NghiaTranUIT added this to Backlog in Proxyman Windows/Linux development via automation Apr 9, 2024
@NghiaTranUIT NghiaTranUIT moved this from Backlog to In progress in Proxyman Windows/Linux development Apr 10, 2024
@kics223w1 kics223w1 added the ✅ Done Ticket is resolved label Apr 13, 2024
@kics223w1 kics223w1 moved this from In progress to PR in Review in Proxyman Windows/Linux development Apr 13, 2024
@NghiaTranUIT NghiaTranUIT moved this from PR in Review to Done in Proxyman Windows/Linux development Apr 15, 2024
@NghiaTranUIT NghiaTranUIT added this to the Proxyman 2.14.0 milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ✅ Done Ticket is resolved
Development

No branches or pull requests

2 participants