Last active
August 29, 2015 14:07
-
-
Save msomu/a558952f1a14b5fbe69a to your computer and use it in GitHub Desktop.
JSON Array Parsing in android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
JSONArray flimsJSON = new JSONArray(s); | |
int numVideos = flimsJSON.length(); | |
for(int i =0; i<numVideos;i++){ | |
JSONObject titleJSON = (JSONObject) flimsJSON.get(i); | |
String titleString = titleJSON.getString("title"); | |
Log.d("TITLE:",titleString); | |
} | |
Log.d("Number of MOVIES FETCHED","is"+numVideos); | |
} catch (JSONException e) { | |
Log.e("Error","ALL ERROR"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
id: "170", | |
yid: "6O1wXJBlN6A", | |
userid: "15", | |
vpath: "", | |
title: "Sainma", | |
url: "", | |
descr: "In a small sleepy town, trouble is brewing. Our ordinary looking hero Ramu aided by his faithful sidekick Galeez, fail in their masteplan to elope with Ramu's sweetheart Ramula ( for the third time).", | |
email: "", | |
direction: "", | |
story: "", | |
camera: "", | |
lang: "tamil", | |
cate: "", | |
genre: "love", | |
views: "0", | |
duration: "00:26:13", | |
status: "1", | |
type: "1" | |
}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{}, | |
{} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment