android - Sending Integer to Json Call -


Actually "speaking rigidly, Jason has been implicated, so you can not send it as an integer, This is a string. "It is said 2 years ago, so I wonder if there is any change in JSON to get an integer from the JSON object. I try to call the integer this way;

  Fixed Ent version CODE = 0; JsonObject = new JSONObject (results); JSONObject queryJSONObject = jsonObject.getJSONObject ("query"); VersionCode = queryJSONObject.getInt ("versionCode");  

And JSON is like this;

{"query": {"versionCode": 1, ....}}

Can anything be done?

Thank you.

Follow this You can use the GetString () function to get the value


Comments

Popular posts from this blog

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

c# - Split String between 2 substrings without removing delimiters -

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -