I\'m trying to parse the JSON string using java. I don\'t know How to do that, I searched lot in internet and I got some idea. With that I have build code, but it doesn\'t w
18446744073709551615 is 2^64 and until Java 8 the maximum value of a long is 2^63 - 1 (which is 9223372036854775807). In Java 8, you can have an unsigned long which is 2^64 but then you're tying yourself to a specific minimum version of Java.
Checking the source of org.json.simple.parser.JSONParser, etc, neither BigInteger nor BigDecimal are mentioned, so it looks like you'll need an alternative parser.
Some JSON parsers give you explicit control over this behaviour, e.g. in Jackson you have
mapper.enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
mapper.enable(DeserializationFeature.USE_BIG_INTEGER_FOR_INTS);
There's some useful information in this question too.