title: android json exception typeMismatch
body: <p>my app was working really nice with that json</p>
  
  <pre><code>{
  "id":"1",
  "title_en":"Civil War",
  "artist_en":"MOTORHEAD"
  }
  </code></pre>
  
  <p>but when i tried to add multiple songs like that</p>
  
  <pre><code>{
  "song_list":[
      {"id":"1",
      "title_en":"Civil War",
      "artist_en":"MOTORHEAD"},
      {"id":"2",
      "title_en":"Slide It In",
      "artist_en":"WHITESNAKE"}]
  }
  </code></pre>
  
  <p>it generates an exception, even before retrieving data</p>
  
  <pre><code>09-08 07:29:53.998: W/System.err(982): org.json.JSONException: Value ? of type java.lang.String cannot be converted to JSONObject
  09-08 07:29:53.998: W/System.err(982):  at org.json.JSON.typeMismatch(JSON.java:107)
  09-08 07:29:53.998: W/System.err(982):  at org.json.JSONObject.&lt;init&gt;(JSONObject.java:158)
  09-08 07:29:53.998: W/System.err(982):  at org.json.JSONObject.&lt;init&gt;(JSONObject.java:171)
  09-08 07:29:53.998: W/System.err(982):  at com.dwaik.jsonparser.JSONParser.getJSONObject(JSONParser.java:46)
  09-08 07:29:53.998: W/System.err(982):  at com.dwaik.myapp.CustomizedListView.onCreate(CustomizedListView.java:48)
  </code></pre>
  
  <p>additional info : the parser</p>
  
  <pre><code>public JSONObject getJSONObject(InputStream inputStream)
  {
      String result = null;
      JSONObject jObject = null;
      try
      {
          // json is UTF-8 by default
          BufferedReader reader;
          reader = new BufferedReader(new InputStreamReader(inputStream,"UTF-8"), 8);
          StringBuilder sb = new StringBuilder();
          String line = null;
          while ((line = reader.readLine()) != null)
              sb.append(line + "\n");
  
          result = sb.toString();
          jObject = new JSONObject(result);
      }
      catch (JSONException e)
      {
          e.printStackTrace();
          return null;
      }
      catch (IOException e)
      {
          e.printStackTrace();
          return null;
      }
      finally
      {
          try
          {
              if (inputStream != null)
                  inputStream.close();
          }
          catch (Exception e)
          {
          }
      }
      return jObject;
  }
  </code></pre>
  
  <p>and its call</p>
  
  <pre><code>final JSONObject jObject = (new JSONParser(this)).getJSONObject(getResources().openRawResource(R.raw.sample));
  </code></pre>