Thursday 4 May 2017

JSON.parse big numbers result in incorrect numbers

Allright, while parsing a json object, the data of a key (length of 17 characters) is being modified. I assume it is rounding it which is an issue to me.

{
  "Content": "message",
  "User": 21576321584956327
}

I'm applying JSON.parse on it and the result is:

{
  Content: 'message',
  User: 21576321584956320
}

7 has become 0. I tried stringify on it but the result is: undefined



via Nox

No comments:

Post a Comment