title: Android : org json jsonexception no value for
body: <p>i use this json url :
  <a href="https://www.theaudiodb.com/api/v1/json/1/search.php?s=coldplay" rel="nofollow noreferrer">https://www.theaudiodb.com/api/v1/json/1/search.php?s=coldplay</a></p>
  
  <pre><code>{
  "artists": [
      {
          "idArtist": "111239",
          "strArtist": "Coldplay",
          "strArtistStripped": null,
          "strArtistAlternate": "",
          "strLabel": "Parlophone",
          "idLabel": "45114",
          "intFormedYear": "1996",
          "intBornYear": "1996",
          "intDiedYear": null,
          "strDisbanded": null,
          "strStyle": "Rock/Pop",
          "strGenre": "Alternative Rock",
           etc
  }
  </code></pre>
  
  <p>and this is my android java code :</p>
  
  <pre><code>    void syncToUrl() {
      AsyncHttpClient client = new AsyncHttpClient();
      String url = "https://www.theaudiodb.com/api/v1/json/1/search.php?s=coldplay";
  
      client.get(url, new TextHttpResponseHandler() {
          @Override
          public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
              Toast.makeText(MainActivity.this, "Error", Toast.LENGTH_SHORT).show();
          }
  
          @Override
          public void onSuccess(int statusCode, Header[] headers, String responseString) {
              parseAndShow(responseString);
  
          }
      });
  }
  void parseAndShow(String responce) {
      try {
          JSONObject artistBio = new JSONObject(responce);
  
          artistNickname.setText(artistBio.getString("strArtist"));
  
      } catch (Exception e) {
          Toast.makeText(MainActivity.this, e.toString(), Toast.LENGTH_SHORT).show();
          Error.setText(e.toString());
      }
  }
  </code></pre>
  
  <p>But I still get this Error:
  org.json.jsonexception no value for strArtist.</p>
  
  <p>The strArtist has this value "Coldplay", but why do I get this error?</p>