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

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

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -