title: my PostExecute doesn't execute in my Async
body: <p>I'm trying to read data from this API: <a href="http://events.makeable.dk/api/getEvents%22;" rel="nofollow">http://events.makeable.dk/api/getEvents</a> with the AsyncTask method which Is first time I try this. I'm trying to only read all TITLES from the API, but I'm not getting any titles.</p>
  
  <p>Instead I get this exception: <code>W/System.err: org.json.JSONException: (...)</code>
  Which shows me the whole API.</p>
  
  <p>I have put Log.d(); around my code and I can se that my code never do or reach something in <code>onPostExecute(String s)</code> and thats is maybe why I never get any TITLES.</p>
  
  <p>The many examples on the web of how to do this is so different from eachother and makes this very frustrating to solve! </p>
  
  <pre><code>   private class JsonParser extends AsyncTask&lt;String, Void, String&gt; {
  
      HttpURLConnection conn;
      URL url = null;
  
      @Override
      protected void onPreExecute() {
  
  
          super.onPreExecute();
          Toast.makeText(MainActivity.this, "LOADING DATA FROM API", Toast.LENGTH_SHORT).show();
      }
  
  
      @Override
      protected String doInBackground(String... params) {
  
          try{
  
              url = new URL(URL);
              conn = (HttpURLConnection)url.openConnection();
              conn.setRequestMethod("GET");
              conn.setDoOutput(true);
  
              if(conn.getResponseCode() == HttpURLConnection.HTTP_OK){
  
                  InputStream inputStream = conn.getInputStream();
                  BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
                  StringBuilder result = new StringBuilder();
                  String line;
  
  
                  while ((line = reader.readLine())!= null){
                      result.append(line);
                  }
  
                  return  (result.toString());
              }
  
          }catch (MalformedURLException e){
              e.printStackTrace();
          }catch (Exception ee){
              ee.printStackTrace();
          }
  
          return "";
  
      }
  
  
      @Override
      protected void onPostExecute(String s) {
  
  
          //------ never comes below this area //-----------
          try{
  
              JSONArray jsonArray = new JSONArray(s);
  
              for(int i =0; i&lt;jsonArray.length(); i++){
  
                  JSONObject jsonObject = jsonArray.getJSONObject(i);
                  Log.d("TAG", "JSON: " + jsonObject.getString("TITLE"));
              }
  
          }catch (Exception e){
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>