title: JSONObject text must begin with '{'
body: <p>I have this JSONObject:</p>
  
  <pre><code>{
    "gutter_url" : "",
    "sort_order" : "popularity",
    "result" : [
      {
        "afs" : "Y",
        "release_year" : 1979,
        "album_sort" : "Wall, The"
      }
    ]
  }
  </code></pre>
  
  <p>and want to get the Array at the position "result",
  so I wrote this code:</p>
  
  <pre><code>JSONObject allCDs = new JSONObject(objectString);
  JSONArray CD_List = allCDs.getJSONArray("result");
  </code></pre>
  
  <p>But then I get this Exception:</p>
  
  <pre><code>Exception in thread "main" org.json.JSONException: A JSONObject text must begin with '{' at character 1
   at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
   at org.json.JSONObject.&lt;init&gt;(JSONObject.java:179)
   at org.json.JSONObject.&lt;init&gt;(JSONObject.java:402)
   at de.htwberlin.gim.Aufgabe8_5.getCoversFor(Aufgabe8_5.java:55)
   at de.htwberlin.gim.Aufgabe8_5.main(Aufgabe8_5.java:77)
  </code></pre>