title: Android JSon error "Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2"
body: <p>I am getting JSon data from a web service, the sample data is given below:</p>
  
  <pre><code>[
    {
      "SectionId": 1,
      "SectionName": "Android"
    }
  ]
  </code></pre>
  
  <p>When i try to convert it, it throws an error, i am doing it as:</p>
  
  <pre><code>Data data = new Gson().fromJson(jsonDataFromWebService, Data.class);
  </code></pre>
  
  <p>My Section Class is:</p>
  
  <pre><code>class Section
  {
      public int SectionId;
      public String SectionName;
  }
  
  class Data {
      public List&lt;Section&gt; sections;
  }
  </code></pre>
  
  <p><strong>The LogCat says:</strong></p>
  
  <blockquote>
    <p>com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
    Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2</p>
  </blockquote>