Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get & parse a JSON object in Android?
    text
    copied!<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/2845599/how-do-i-parse-json-from-a-java-httpresponse">How do I parse JSON from a Java HTTPResponse?</a><br> <a href="https://stackoverflow.com/questions/8091051/how-to-parse-json-string-in-android">How to parse json string in Android?</a> </p> </blockquote> <p>How can i parse this json string</p> <pre><code>{ "apiVersion": "2.1", "data": { "id": "pHuoDqcIyqk", "uploaded": "2012-10-29T16:08:15.000Z", "updated": "2012-11-02T08:48:28.000Z", "uploader": "googlenexus", "category": "Tech", "title": "Nexus: Ask Me Anything", "description": "The Best of Google, now in 3 sizes. Introducing Nexus 4, Nexus 7 and Nexus 10. The new smartphone and tablets from Google. Shop now at play.google.com/nexus", "thumbnail": { "sqDefault": "http://i.ytimg.com/vi/pHuoDqcIyqk/default.jpg", "hqDefault": "http://i.ytimg.com/vi/pHuoDqcIyqk/hqdefault.jpg" }, "player": { "default": "http://www.youtube.com/watch?v=pHuoDqcIyqk&amp;feature=youtube_gdata_player", "mobile": "http://m.youtube.com/details?v=pHuoDqcIyqk" }, "content": { "5": "http://www.youtube.com/v/pHuoDqcIyqk?version=3&amp;f=videos&amp;app=youtube_gdata", "1": "rtsp://v8.cache5.c.youtube.com/CiILENy73wIaGQmpyginDqh7pBMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp", "6": "rtsp://v7.cache4.c.youtube.com/CiILENy73wIaGQmpyginDqh7pBMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp" }, "duration": 61, "aspectRatio": "widescreen", "rating": 4.8985643, "likeCount": "5227", "ratingCount": 5363, "viewCount": 1038854, "favoriteCount": 0, "commentCount": 1442, "accessControl": { "comment": "allowed", "commentVote": "allowed", "videoRespond": "moderated", "rate": "allowed", "embed": "allowed", "list": "allowed", "autoPlay": "allowed", "syndicate": "allowed" } } } </code></pre> <p>Can anyone please tell me how to make a call to the above URL &amp; get a JSON object, then parse it to get the desired info as a string?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload