title: How to parse this JSON into java object?
body: <p><a href="http://pastebin.com/rXbeKqAa" rel="nofollow">http://pastebin.com/rXbeKqAa</a></p>
  
  <p>Hi all I have been trying to parse the above JSON into a java program and store it into an object... (Don't have a specific structure at the moment, as long as I can get the data from the object.)</p>
  
  <p>Have been trying to use GSON but I can't seem to get it right..</p>
  
  <pre><code>        String inputLine="";
      HttpClient httpclient= new DefaultHttpClient();
      HttpGet method = new HttpGet("http://localhost:3000/specs/215/errors.js");
      HttpResponse response =httpclient.execute(method);
      BufferedReader in = new BufferedReader(
              new InputStreamReader(
                      response.getEntity().getContent()));
  
      inputLine = in.readLine();
      System.out.println(inputLine);
      in.close();
      Gson gson = new Gson();
      JsonParser parser = new JsonParser();
      JsonArray array = parser.parse(inputLine).getAsJsonArray();
  
      for(int i=0; i &lt; array.size(); i++) {
  
          Errors e = gson.fromJson(array.get(0), Errors.class);
          System.out.println(e.error.getReason());
      }
  </code></pre>
  
  <p>and the error i get is:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalStateException: This is not a JSON Array.
      at com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:99)
      at test.Getter.main(Getter.java:37)
  </code></pre>
  
  <p>Anyone please point me in the right direction?
  Thanks.</p>