title: Android : Error in parsing JSON array using GSON library
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9598707/gson-throwing-expected-begin-object-but-was-begin-array">GSON throwing &ldquo;Expected BEGIN_OBJECT but was BEGIN_ARRAY&rdquo;?</a>  </p>
  </blockquote>
  
  
  
  <p><strong>Scenario :</strong> I am parsing an API which is is JSON format using GSON library. Here the JSON file I am parsing :</p>
  
  <pre><code>{
    "questions": [
      {
        "question_1": "Question 1",
        "options": [
          "option_1 : option1",
          "option_2 : option2",
          "option_3 : option 3",
          "option_4 : option 4"
        ]
      },
      {
        "question_2": "Question 2",
        "options": [
          "option_1 : option 1",
          "option_2 : option 2",
          "option_3 : option 3"
        ]
      }
    ]
  }
  </code></pre>
  
  <p><strong>And my object class looks like this :</strong> </p>
  
  <pre><code>public class Practise_Question_Object {
  
      public List&lt;Questions&gt; questions;
  
      public class Questions {
  
          @SerializedName("question")
          public String Question;
  
          public List&lt;Options&gt; options;
  
          public class Options {
  
              public String Option_1;
  
              public String Option_2;
  
              public String Option_3;
  
              public String Option_4;
          }
  
      }
  </code></pre>
  
  <p><strong>Problem</strong>
  My problem is that whenever I try to parse values It show me error <code>java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 53</code></p>
  
  <p>if I chagne "options" from Array to Object then I can easily parse. But in my project (From PHP side) i cant use Object.</p>