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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -