My problem is very simple, but I'm not sure if there is a "native" solution using JSON.parse.
I get this line from the API:
{ "key" : -922271061845347495 }
When I use JSON.parse in this line, it turns into this object :
{ "key" : -922271061845347500 }
As you can see, parsing stops when the number is too large (you can check this behavior here ). It has only 15 exact digits, the last is rounded, and those that are set after 0. Is there a "native" solution to preserve the exact value? (this is an identifier, so I cannot round it)
I know that I can use regex to solve this problem, but I would prefer to use the "native" method if it exists.
Simon
source share