Unplanned
Last Updated: 02 Sep 2020 10:28 by ADMIN
Nisalon
Created on: 25 Aug 2020 10:42
Type: Bug Report
0
Fiddler incorrectly interpreting some int64 numbers

Hello

I've the following request response:


{
    "proId": 98767975948505330
}

This is correctly displayed in the "Raw Tab", but when switching to the JSON tab, the displayed number is not correct.

https://imgur.com/a/SfsVHkd

Could you fix this ?

Thanks

5 comments
ADMIN
Nick Iliev
Posted on: 02 Sep 2020 10:28

Hi Eric,

 

Thanks for the notice! I've escalated the behavior as a bug (both for the classic Fiddler and Fiddler Everywhere) and the team will look into it in future releases.

 

Regards,
Nick Iliev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Eric
Posted on: 31 Aug 2020 14:48

Notably, FiddlerEverywhere will still change numbers:

99999999999999999999 renders as 100000000000000000000

 

Also, the JSON parser in Fiddler Everywhere will not render anything at all for 

   {   this_is_big: 98767975948505330 }

It requires that you quote the name, like:

   {  "this_is_big": 98767975948505330 } 

 

 

ADMIN
Nick Iliev
Posted on: 31 Aug 2020 05:53

Hello Nisalon,

 

As Eric noticed the issue is indeed a legit limitation related to the JSON parser and larger numbers. I am marking the issue as a valid bug to be fixed in the classic Fiddler. As a side note, I wanted to let you know that the new FIddler Everywhere handles large numbers as expected (the bug is not present)

 

Regards,
Nick Iliev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Eric
Posted on: 25 Aug 2020 15:56
Notably, Telerik could fix this by updating the JSON parser (based on an open-source library) but if they do so I hope they add a JSONParseWarning to the JSON tab to warn the user that the values are not interoperable.
Eric
Posted on: 25 Aug 2020 15:43

You've encountered a fun limitation in JavaScript; you cannot safely use numbers of that size in JSON.

Your number, 

   98767975948505330

is significantly larger than the largest integer that can be represented safely in a JavaScript number (which is a floating point value):

 

    9007199254740991  = MAX_SAFE_INTEGER 

 

If you want such numbers to be interpreted safely by all clients, you need to send them as strings and serialize/deserialize them as needed.

REF: 
https://stackoverflow.com/questions/13502398/json-integers-limit-on-size#comment80159722_13502497