2

I have a API that returns JSON object with field that was of type long on the server side. I noticed that the number gets malformed on client side. This is a sample:

var tmp = JSON.parse("9410110000000363");
console.log(tmp); // output: 9410110000000364

var tmp2 = 9410110000000363;
console.log(tmp2); // output: 9410110000000364

Any ideas why?

dragonfly
  • 17,407
  • 30
  • 110
  • 219

0 Answers0