Android google日历的JSONArray和JSONObject
我正在尝试创建一个android应用程序,使用json输出从google calender读取信息 有谁能告诉我如何使用android sdk中可用的JSONArray和JSONObject选项来实现这一点 非常感谢您在这方面的帮助 提前感谢…这里有一个例子Android google日历的JSONArray和JSONObject,android,json,google-calendar-api,Android,Json,Google Calendar Api,我正在尝试创建一个android应用程序,使用json输出从google calender读取信息 有谁能告诉我如何使用android sdk中可用的JSONArray和JSONObject选项来实现这一点 非常感谢您在这方面的帮助 提前感谢…这里有一个例子 // Query the API for content String content = getUrlContent(String.format(WIKTIONARY_PAGE, enco
// Query the API for content
String content = getUrlContent(String.format(WIKTIONARY_PAGE,
encodedTitle, expandClause));
try {
// Drill into the JSON response to find the content body
JSONObject response = new JSONObject(content);
JSONObject query = response.getJSONObject("query");
JSONObject pages = query.getJSONObject("pages");
JSONObject page = pages.getJSONObject((String) pages.keys().next());
JSONArray revisions = page.getJSONArray("revisions");
JSONObject revision = revisions.getJSONObject(0);
return revision.getString("*");
} catch (JSONException e) {
throw new ParseException("Problem parsing API response", e);
}
感谢您的迅速回复。我会尝试一下并分享我的经验。再次感谢。。。!!!谢谢,如果你能帮我选择答案的话。我在谷歌日历json输出中没有看到节点查询。我看到节点“入口”。我如何解析它以获得所需的信息。