java - org.json.JSONObject.getLong gives imprecise result -


wrong precision in long conversion

in android, can see attached figure, json received server "id=-7051563524465472446" code jsonobject.getlong("id") gives -7051563524465472512.

i can see every getlong conversion has imprecise result(or lose precision?) in last 4 digits. there missed?

my settings: java 1.6.0_41, android 4.1.2, intellij 12 ide.

long.parselong(jsonobject.getstring("id")) gives precise result.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -