2010-11-27 17 views

Antwort

0

Hier ist ein Beispiel

// 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); 
     } 
+0

die schnelle Antwort zu schätzen wissen. Ich werde das versuchen und meine Erfahrung teilen. Danke noch einmal ...!!! – bp581

+0

Danke, wenn es geholfen hat, kannst du meine Antwort auswählen. – gk1

+0

Ich sehe die Knoten Abfrage in Google Kalender JSON-Ausgabe nicht. Ich sehe den Knoten "Eintrag". Wie kann ich dies analysieren, um die benötigten Informationen zu erhalten? – bp581

Verwandte Themen