title: Conversion Casting Issues
body: <p>I am developing a small side scroller game using slick 2D lwjgl and am running into a current error while casting something.</p>
  
  <p>It seems to be not recognizing that i'm casting the json string as a JsonArray.</p>
  
  <p>The error and the function,</p>
  
  <pre><code>java.lang.ClassCastException: java.lang.String cannot be cast to org.json.simple.JSONArray
      at world.World.load(World.java:35)
      at game.Engine.initStatesList(Engine.java:64)
      at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:164)
  </code></pre>
  
  <p>function:</p>
  
  <pre><code>public static void load(String path) throws Exception
  {
      JSONParser parser = new JSONParser();
      Object obj = parser.parse(new FileReader(path));
      JSONObject jSonOBJ = (JSONObject)obj;
  
      JSONArray layers = (JSONArray)jSonOBJ.get("layers");
      int amount = layers.size();
  
      for (int i = 0; i &lt; amount; ++i)
      {
          JSONObject layer = (JSONObject) layers.get(i);
          String type = (String)layer.get("name");
  
          if (type.equals("solids"))
          {
              solids = parse((JSONArray)layer.get("data")); //error
          }
          else if (type.equals("spawns"))
          {
              //to-do
          }
      }
  }
  </code></pre>
  
  <p>this is just to parse if the json, my map, tile is a solid or not, but I have been stuck on this small error for a little time. the line of code <code>solids = parse((JSONArray)layer.get("data"));</code> should convert it to JSONArray correct?</p>