Parsing JSON data in Android/Java
<p>I am trying to get the URL from the following JSON response:</p>

<pre><code>{
    "json": {
        "errors": [],
        "data": {
            "url": "urlIWant.com",
            "id": "asdklfjads",
            "name": "sdfjklsdf"
        }
    }
}
</code></pre>

<p>I have been banging my head against the wall trying to get the URL out of this response. What code do I need to access that url in Android?</p>

<p>Here is the latest few lines of code that I have tried to get the url.</p>

<pre><code> JSONObject json = new JSONObject(responseStr);
 json = json.getJSONObject("data"); //Get the "data" object out of the JSON
 url = json.getString("url"); //Grab the URL from the object
 Log.d("JSON URL", url); //url is null here
</code></pre>