KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I can't get the array length of the JSON array. when I using length(); method it is not working, it show as red underline in Netbeans this is the source code try { JSONObject myjson = JSONObject.fromObject(practiceInfoByUsername); //JSONArray nameArray = myjson.names(); final JSONArray jar = myjson.getJSONArray("_types"); for(int i=0; i<jar.length(); i++) { String p = jar.getString(i); Log.i("p",p); } } catch (JSONException e) { e.printStackTrace(); }
Tags (comma-separated)
Save Edits
Cancel