A JSONArray text must start with '[' at 1 [character 2 line 1]
<p>I have a JSON file and i am trying to deal with but the following error is appears:</p>

<blockquote>
  <p>Exception in thread "main" org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
      at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
      at org.json.JSONObject.(JSONObject.java:195)
      at org.json.JSONObject.(JSONObject.java:319)
      at amazondataset.AmazonDataset.main(AmazonDataset.java:11)
  Java Result: 1</p>
</blockquote>

<p>This is a sample of the file:</p>

<pre><code>{ "reviewerID": "A2SUAM1J3GNN3B", 
  "asin": "0000013714", 
  "reviewerName": "J. McDonald", 
  "helpful": [2, 3], 
  "reviewText": "I bought this for my husband who plays the piano. He is having a wonderful time playing these old hymns. The music is at times hard to read because we think the book was published for singing from more than playing from. Great purchase though!", 
  "overall": 5.0, 
  "summary": "Heavenly Highway Hymns", 
  "unixReviewTime": 1252800000, 
  "reviewTime": "09 13, 2009" 
}
</code></pre>

<p>and this is my code, simply: </p>

<pre><code>JSONObject ar = new JSONObject("E:\\amazonDS.json");

    for (int i = 0; i &lt; ar.length(); i++) {
       System.out.println( "Name: " + ar.getString("reviewerName").toString() );            
    }
</code></pre>