Skip to content

Instantly share code, notes, and snippets.

@ymow
Created March 23, 2014 23:52
Show Gist options
  • Save ymow/9731698 to your computer and use it in GitHub Desktop.
Save ymow/9731698 to your computer and use it in GitHub Desktop.
String jsonData = builder.toString();
// JSONArray latest = null;
JSONObject json = new JSONObject(jsonData);
// JSONObject latest = json.getJSONObject("latest");
// String time = new JSONObject(jsonData).getString("time");
// String location = new JSONObject(jsonData).getString("location");
// String content = new JSONObject(jsonData).getString("content");
JSONArray time = latest.getJSONArray("time");
// JSONArray location = latest.getJSONArray("location");
// JSONArray content = latest.getJSONArray("content");
//// String mJsonText = EntityUtils.toString(responce.getEntity());
// String mTitle = new JSONObject(new JSONObject(mJsonText).getString("latest")).getString("content");
//
// Log.d("d",mTitle);
Log.d("d","before");
for(int i =0; i<latest.length(); i++)
{
JSONObject news = latest.getJSONObject(i);
System.out.println(i);
Log.d("time",news.getString("time"));
// Log.d("location",news.getString("location"));
// Log.d("content",news.getString("content"));
// String location = new JSONObject(jsonData).getString("location");
videoArrayList.add(news.getString("time"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment