Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. {
  2. "query": {
  3. "pages": {
  4. "7931046": {
  5. "pageid": 7931046,
  6. "ns": 0,
  7. "title": "Tang Aidi",
  8. "revisions": [
  9. {
  10. "contentformat": "text/x-wiki",
  11. "contentmodel": "wikitext",
  12. "*": "SOME TEXT"
  13. }
  14. ]
  15. }
  16. }
  17. }
  18. }
  19.  
  20. JSONObject["pages"] not found
  21.  
  22. JSONObject obj = new JSONObject(sEntireContent);
  23. JSONObject oParse=(JSONObject) obj.get("query");
  24. //JSONArray oPages=oParse.getJSONArray("pages");
  25. >>>>>>>>>> JSONObject oPages=(JSONObject) obj.get("pages");
  26. JSONObject firstPage=(JSONObject) oPages.get(0);
  27. JSONObject oRevisions=(JSONObject) firstPage.get("revisions");
  28. sWikitext=oRevisions.getString ("*");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement