org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject
<p>I'm trying to read a JSON file in which I have a series of integer data but when read tells me it can not convert from JSONObject to JSONArray</p>

<p>Part of the JSON file structure is:  </p>

<pre><code>{  
    "data": [  
        [1, 1, 1, 1, 1, 1, 1, 1],  
        [1, 1, 0, 0, 0, 0, 1, 1],  
        [1, 1, 0, 0, 0, 0, 1, 1],  
        [0, 1, 1, 0, 0, 1, 1, 0],  
        [0, 1, 1, 1, 1, 1, 1, 0],  
        [0, 0, 1, 1, 1, 1, 0, 0],  
        [0, 0, 0, 0, 0, 0, 0, 0],  
        [0, 0, 0, 0, 0, 0, 0, 0]  
    ],  
    "time": 0.2  
}, 
</code></pre>

<p>Code: </p>

<pre><code>public static void main(String[] args) throws InterruptedException {

JSONParser parser = new JSONParser();


try {

    Object obj = parser.parse(new FileReader("C:\\Carriots\\dos.json"));

    JSONObject jsonObject = (JSONObject) obj;


    // loop array
    JSONArray tag = (JSONArray) jsonObject.get("data");


    Iterator iterator = tag.iterator();

    while (iterator.hasNext()) {
    System.out.println(iterator.next());

}
</code></pre>