title: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
body: <p>I'm trying to parse below <code>json</code> file:</p>
  
  <pre><code>{"units":[{"id":42,               
     "title":"Hello World",          
      "position":1,
      "v_id":9,
      "sites":[[{"id":316,
        "article":42,
        "clip":133904
          }],
         {"length":5}]
  
     }, ..]}
  </code></pre>
  
  <p>This is what I have tried:</p>
  
  <pre><code>Object obj = null;
  JSONParser parser = new JSONParser();
  Object unitsObj = parser.parse(new FileReader("file.json");
  JSONObject unitsJson = (JSONObject) unitsObj;
  
  JSONArray units = (JSONArray) unitsJson.get("units");
  Iterator&lt;String&gt; unitsIterator = units.iterator();
  while(unitsIterator.hasNext()){         
      Object uJson = unitsIterator.next();
      JSONObject uj = (JSONObject) uJson;
      obj =  parser.parse(uj.get("sites").toString());
      JSONArray jsonSites = (JSONArray)  obj;
  
      for(int i=0;i&lt;jsonSites.size();i++){
       JSONObject site = (JSONObject)jsonSites.get(i); // Exception happens here.
       System.out.println(site.get("article");
      }
  }
  </code></pre>
  
  <p>The code is not working when I try to parse the inner <code>json array</code>, so I get:</p>
  
  <pre><code>Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
  </code></pre>
  
  <p>The exception is pointing to this line:</p>
  
  <pre><code>JSONObject site = (JSONObject)jsonSites.get(i);
  </code></pre>
  
  <p>Any help? tnx.</p>