I am using ASP.NET core web application that fetches some data from database and returns a data transfer object serialized to JSON. I have noticed that when the data contains a big number (e.g. 70679185527693127) then the number is rounded when pretty-printed. I inspected the returned JSON using browser developer tools (Firefox & Chrome) and raw data is correct, but incorrect when pretty-printed. I have also tried to pretty-print the JSON using this website and the results are still the same. This is for some reason a problem for my Kendo grid that I am trying to show the data in as it shows the wrong rounded data. Why is that? Do I have to avoid using such big numbers?
Here is the very simplified JSON:
{"Data":[{"Id":70679185527693127}],"Total":1}
Here is the pretty-printed version:
{
"Data": [
{
"Id": 70679185527693130
}
],
"Total": 1
}
See the difference in the values.
EDIT: Passing the value as a string works as expected (atleast using the mentioned website). Also a side question: why does the Kendo grid show the pretty-printed data instead of parsing the raw data which seem to be correct?