title: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
body: <p>I am using <code>Retro Fit</code> to connect to API online. But I am getting this error while trying to parse the returned data.</p>
  
  <pre><code>retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
  </code></pre>
  
  <p>The data being returned is in <a href="https://developers.google.com/places/documentation/search#PlaceSearchPaging">This</a> format and model for data is also given below:</p>
  
  <pre><code>iGPlaceApi.getStreams(ITEMS_PER_PAGE, pageNumber * ITEMS_PER_PAGE, new Callback&lt;List&lt;mGooglePlacesApiResponse&gt;&gt;() {
  
              @Override
              public void success(List&lt;mGooglePlacesApiResponse&gt; mGp, Response response) {
                  int n = mGp.size();
                  Object asa = mGp.toArray();
              }
  
              @Override
              public void failure(RetrofitError retrofitError) {
                  String error = retrofitError.toString();
              }
          });
  
  public class mGooglePlacesApiResponse {
  
      public String html_attributions;
      //public List&lt;String&gt; html_attributions;
      public String next_page_token;
      public List&lt;place&gt; results;
  }
  
  public class place {
  
      public Geometry geometry;
      public String icon;
      public String id;
      public String name;
      public OpeningHours opening_hours;
      public List&lt;Photo&gt; photo
      ...
  </code></pre>