Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android google日历的JSONArray和JSONObject_Android_Json_Google Calendar Api - Fatal编程技术网

Android google日历的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

我正在尝试创建一个android应用程序,使用json输出从google calender读取信息

有谁能告诉我如何使用android sdk中可用的JSONArray和JSONObject选项来实现这一点

非常感谢您在这方面的帮助

提前感谢…

这里有一个例子

// 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输出中没有看到节点查询。我看到节点“入口”。我如何解析它以获得所需的信息。