title: Json-Simple , Cast Exception
body: <p>please find my code below. When I run this I'm getting <code>org.json.simple.JSONObject cannot be cast to org.json.simple.JSONArray</code> exception. please help. I'm trying to print all the values inside the JSON</p>
  
  <pre><code>public static void main(String[] args) throws Exception {       
      URL website = new URL("http://MY_TESTING_SITE");
      URLConnection connection = website.openConnection();
      BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
  
      StringBuilder response = new StringBuilder();
      String inputLine;
  
  
      while ((inputLine = in.readLine()) != null) 
          response.append(inputLine);
  
      in.close();   
  
      JSONParser parser = new JSONParser();
      Object obj = parser.parse(response.toString());
      JSONObject jsonObject = (JSONObject) obj;
  
      System.out.println(jsonObject.get("data"));   //Works fine till here and get proper output
  
      JSONArray msg = (JSONArray) jsonObject.get("data");
  
  
      Iterator&lt;String&gt; iterator = msg.iterator();
      while (iterator.hasNext()) {
          System.out.println(iterator.next());
      }   
  
  }
  </code></pre>
  
  <p>The sample JSON Output looks like the one shown below:</p>
  
  <p>{
      "tsNow": 1376325485,
      "data": {
          "1352": {
              "for_loyal": "1",
              "offer_image": "<a href="http://MY_IMAGE.jpg" rel="nofollow">http://MY_IMAGE.jpg</a>",
              "status": "1",
              "brand_id": "22",
              "id": "1352",
              "brand_image": "<a href="http://MY_BRAND_IMAGE.png" rel="nofollow">http://MY_BRAND_IMAGE.png</a>",
              "title": "Win 20 Family Holidays to USA",
              "description": "Some description ",
              "expiry_date": 1383018300,
              "brand_name": "BRAND NAME",
              "store_locations": [
                  {
                      "city_id": "46",
                      "country_id": "9"
                  }
                    ]
          }
      },
      "success": true
  }</p>