I’m new to Android. I know a little about JSON parsing in Android. I’m parsing a twitter feed where I want to parse the tag called “user”, which contains profile_image_url and screen_name.
The JSON feed is here. Here is my code:
JSONParser jParser = new JSONParser();
// getting JSON string from URL
JSONObject json = jParser.getJSONFromUrl(url);
try {
// Getting Array of Contacts
contacts = json.getJSONArray(USER);
// looping through All Contacts
for(int i = 0; i < contacts.length(); i++){
JSONObject c = contacts.getJSONObject(i);
}
You can use JSONObject in android.