title: Attempt to invoke virtual method 'int org.json.JSONArray.length()' on a null object reference
body: <p>I'm getting the following error when trying to populate my list view with JSON data:</p>
  
  <pre><code>10-01 11:50:34.678    2782-2797/? I/System.out﹕ Returned Json object {"match_name":"EG vs EHOME","match_time":"2015-10-15 09:00:00"}
  10-01 11:50:34.678    2782-2782/? I/System.out﹕ Resulted Value: {"match_name":"EG vs EHOME","match_time":"2015-10-15 09:00:00"}
  10-01 11:50:34.679    2782-2782/? D/AndroidRuntime﹕ Shutting down VM
  10-01 11:50:34.679    2782-2782/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.example.eduard.games, PID: 2782
  java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONArray.length()' on a null object reference
  </code></pre>
  
  <p>on the following line of code:</p>
  
  <pre><code>for(int i = 0; i &lt; jsonArray.length(); i++){
  </code></pre>
  
  <p>My method adding the json data to the listview</p>
  
  <pre><code>List&lt;getMatch&gt; returnParsedJsonObject(String result){
  
      List&lt;getMatch&gt; jsonObject = new ArrayList&lt;getMatch&gt;();
  
      JSONObject resultObject = null;
  
      JSONArray jsonArray = null;
  
      getMatch newItemObject = null;
  
  
      for(int i = 0; i &lt; jsonArray.length(); i++){
  
          JSONObject jsonChildNode;
  
          try {
  
              jsonChildNode = jsonArray.getJSONObject(i);
  
              String match_name = jsonChildNode.getString("match_name");
  
              String match_time = jsonChildNode.getString("match_time");
  
  
              newItemObject = new getMatch(match_name, match_time);
  
              jsonObject.add(newItemObject);
  
          } catch (JSONException e) {
  
              e.printStackTrace();
  
          }
  
      }
  
      return jsonObject;
  }
  </code></pre>
  
  <p>my json output:</p>
  
  <pre><code>[{"match_name":"Secret vs EG","match_time":"2015-09-30 02:06:30"},     {"match_name":"LGD vs EHOME","match_time":"2015-10-08 13:10:00"},   {"match_name":"EG vs EHOME","match_time":"2015-10-15 09:00:00"}]
  </code></pre>
  
  <p>I would appreciate any help.</p>