I set up a system that parses a compact data string into JSON. I\'m using a 19 digit number to store ids. Unfortunately any number greater than 17 digits, parseFloat()
JavaScript has only one numeric type, which is an IEEE 754 double precision floating-point. That means, you have a maximum of 52 bits of precision, which is a bit more than 15 decimal places.
If you need more precision than that, you have to use a bignum library or work with strings.
Numbers in JavaScript lose precision if they are higher than a certain value.
According to http://www.hunlock.com/blogs/The_Complete_Javascript_Number_Reference, integers are only reliable up to 15 digits (9 * 10^15
to be exact).
Try one of these 1. Use a string 2. Split your number in two and save the smaller parts to an array 3. Bignum library 4. Use a smaller number if you can