Created
March 23, 2014 23:52
-
-
Save ymow/9731698 to your computer and use it in GitHub Desktop.
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
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