title: JSON Array With GSON Throws Error "Expected BEGIN_OBJECT but was STRING"
body: <p>I am trying to convert a JSON array to a Java object, but I am having problems understanding how to use GSON.</p>
  
  <p>The JSON array looks like this:</p>
  
  <pre><code>"[
    {
      "category": "1",
      "checks": [
        {
          "check": "1.1",
          "penaltypoints": "1.1",
          "keypoint": "1.1"
        },
        {
          "check": "1.2",
          "penaltypoints": "1.2",
          "keypoint": "1.2"
        }
      ]
    },
    {
      "category": "2",
      "checks": [
        {
          "check": "2.1",
          "penaltypoints": "2.1",
          "keypoint": "2.1"
        },
        {
          "check": "2.2",
          "penaltypoints": "2.2",
          "keypoint": "2.2"
        }
      ]
    }
  ]"
  </code></pre>
  
  <p>My corresponding Java classes are:</p>
  
  <pre><code>class Category {
      public String description;
      public List&lt;Check&gt; checks;
  }
  
  class Check {
      public String description;
      public float penaltyPoints;
      public KeyPoint keypoint;
  }
  
  class KeyPoint {
      public String description;
  }
  </code></pre>
  
  <p>And this is how I called GSON:</p>
  
  <pre><code>Gson gson = new Gson();         
  Category categoriesArray[] = gson.fromJson(jsonString, Category[].class);
  </code></pre>
  
  <p>At the moment it is throwing up the following error:</p>
  
  <pre><code>Expected BEGIN_OBJECT but was STRING at line 1 column 125
  </code></pre>
  
  <p>I am new to GSON and am having problems understanding how it works. Can anyone please help me understand what I am doing wrong?</p>