[GH-ISSUE #169] number value in JSON response parse error #166

Closed
opened 2026-03-03 19:15:52 +03:00 by kerem · 8 comments
Owner

Originally created by @jkyeo on GitHub (Jun 11, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/169

Originally assigned to: @NghiaTranUIT on GitHub.

Which Proxyman version are you using? (Ex. Proxyman 0.5 (200))

Version 1.4.1.1 (1411)

What OS Version are you using? (Ex. mac 10.13)

macOS 10.14.5

Steps to reproduce this issue

view https response in JSON mode

raw data is:

{"feeList":[{"key":"xxx Fee","price":18.00},{"key":"Bank Charges","price":3.20},{"key":"Tax","price":7.88}],"predictPrice":70.92,"voucher":0}

but get incorrect formatted JSON in number format:

{
          "feeList" : [
            {
              "key" : "xxx Fee",
              "price" : 18
            },
            {
              "key" : "Bank Charges",
              "price" : 3.2000000000000002
            },
            {
              "key" : "Tax",
              "price" : 7.8799999999999999
            }
          ],
          "voucher" : 0,
          "predictPrice" : 70.920000000000002
        }
Originally created by @jkyeo on GitHub (Jun 11, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/169 Originally assigned to: @NghiaTranUIT on GitHub. ### Which Proxyman version are you using? (Ex. Proxyman 0.5 (200)) Version 1.4.1.1 (1411) ### What OS Version are you using? (Ex. mac 10.13) macOS 10.14.5 ### Steps to reproduce this issue view https response in JSON mode raw data is: ``` {"feeList":[{"key":"xxx Fee","price":18.00},{"key":"Bank Charges","price":3.20},{"key":"Tax","price":7.88}],"predictPrice":70.92,"voucher":0} ``` but get incorrect formatted JSON in number format: ```json { "feeList" : [ { "key" : "xxx Fee", "price" : 18 }, { "key" : "Bank Charges", "price" : 3.2000000000000002 }, { "key" : "Tax", "price" : 7.8799999999999999 } ], "voucher" : 0, "predictPrice" : 70.920000000000002 } ```
kerem 2026-03-03 19:15:52 +03:00
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 11, 2019):

Thank for the report @jkyeo. I've investigated and it turns out that the NSFormatter which I'm using is misconfig 😮

I will send you the update soon.

<!-- gh-comment-id:500768542 --> @NghiaTranUIT commented on GitHub (Jun 11, 2019): Thank for the report @jkyeo. I've investigated and it turns out that the NSFormatter which I'm using is misconfig 😮 I will send you the update soon.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 12, 2019):

Hey @jkyeo,

I've fixed this bug. Technically, I don't use NSJSONSerialization from Cocoa to pretty the json string anymore. The float issues results from how NSNumber store the value 🔥.

You can download the hot-fix build, which fix the JSON issue on float number here: https://www.dropbox.com/s/lclqkucsjl033ui/Proxyman_1.4.1.1.dmg?dl=0

If you're using Proxyman from Setapp, please let me know, then I will sent you the Setapp version (required paid Setapp account to launch).

Thank you so much for the bug report 💌

<!-- gh-comment-id:501117648 --> @NghiaTranUIT commented on GitHub (Jun 12, 2019): Hey @jkyeo, I've fixed this bug. Technically, I don't use [NSJSONSerialization](https://developer.apple.com/documentation/foundation/nsjsonserialization?language=objc) from Cocoa to pretty the json string anymore. The float issues results from how NSNumber store the value 🔥. You can download the hot-fix build, which fix the JSON issue on float number here: https://www.dropbox.com/s/lclqkucsjl033ui/Proxyman_1.4.1.1.dmg?dl=0 If you're using Proxyman from Setapp, please let me know, then I will sent you the Setapp version (required paid Setapp account to launch). Thank you so much for the bug report 💌
Author
Owner

@jkyeo commented on GitHub (Jun 13, 2019):

@NghiaTranUIT Yes, I'm using the Proxyman from Setapp.

<!-- gh-comment-id:501788946 --> @jkyeo commented on GitHub (Jun 13, 2019): @NghiaTranUIT Yes, I'm using the Proxyman from Setapp.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2019):

Hey @jkyeo, here is the Setapp build: https://www.dropbox.com/s/cmpaa4l69b2c85l/Proxyman_1.4.1.1.dmg?dl=0

Let me know if you need further help

<!-- gh-comment-id:501948419 --> @NghiaTranUIT commented on GitHub (Jun 14, 2019): Hey @jkyeo, here is the Setapp build: https://www.dropbox.com/s/cmpaa4l69b2c85l/Proxyman_1.4.1.1.dmg?dl=0 Let me know if you need further help ☕️
Author
Owner

@jkyeo commented on GitHub (Jun 14, 2019):

@NghiaTranUIT It seems this issue still exist.
image

<!-- gh-comment-id:501949829 --> @jkyeo commented on GitHub (Jun 14, 2019): @NghiaTranUIT It seems this issue still exist. <img width="929" alt="image" src="https://user-images.githubusercontent.com/4645158/59480472-4de99080-8e93-11e9-91d8-e683c17b58ce.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2019):

I see the problem @jkyeo. If you open Proxyman from Setapp, it will still open the old build at /Applications/Setapp/Proxyman.app-> Wrong JSON format.

Please open directly the Proxyman in /Applications/Proxyman.app (after dragging from the DMG file)

I will officially push the hot-fix to Setapp in this weekend. So you will have official build from Setapp 👏

Hot-fix build

Screen Shot 2019-06-14 at 13 39 45

Setapp build

Screen Shot 2019-06-14 at 13 40 22
<!-- gh-comment-id:501991007 --> @NghiaTranUIT commented on GitHub (Jun 14, 2019): I see the problem @jkyeo. If you open Proxyman from Setapp, it will still open the old build at `/Applications/Setapp/Proxyman.app`-> Wrong JSON format. Please open directly the Proxyman in `/Applications/Proxyman.app` (after dragging from the DMG file) I will officially push the hot-fix to Setapp in this weekend. So you will have official build from Setapp 👏 ## Hot-fix build <img width="783" alt="Screen Shot 2019-06-14 at 13 39 45" src="https://user-images.githubusercontent.com/5878421/59488933-17b80b00-8eab-11e9-8f92-6e977ac40023.png"> ## Setapp build <img width="794" alt="Screen Shot 2019-06-14 at 13 40 22" src="https://user-images.githubusercontent.com/5878421/59488960-2a324480-8eab-11e9-8fc8-2b04d7c8fc99.png">
Author
Owner

@jkyeo commented on GitHub (Jun 14, 2019):

@NghiaTranUIT It work now, thanks for your patience.

<!-- gh-comment-id:501994479 --> @jkyeo commented on GitHub (Jun 14, 2019): @NghiaTranUIT It work now, thanks for your patience.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2019):

Cool. Official build is gonna release in Monday 👏 Stay tuned!

<!-- gh-comment-id:501995806 --> @NghiaTranUIT commented on GitHub (Jun 14, 2019): Cool. Official build is gonna release in Monday 👏 Stay tuned!
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#166
No description provided.