title: Retrofit throwing error Expected BEGIN_ARRAY but was BEGIN_OBJECT
body: <p>Hi I am new to the Retrofit library, I am having problems parsing some json. I have looked at some other solutions on Stackoverflow but not having much luck with my problem. im trying to get a a simple webservice to work. any suggestions would be gratefully appreciated .. </p>
  
  <p>Json file </p>
  
  <pre><code>{"employees":[
  {"firstName":"John", "lastName":"Doe"}, 
  {"firstName":"Anna", "lastName":"Smith"},
  {"firstName":"Peter", "lastName":"Jones"}
  ]}
  </code></pre>
  
  <p>Request method </p>
  
  <pre><code>public void requestEmployeeData(String uri){
          RestAdapter adapter = new RestAdapter.Builder().setEndpoint(ENDPOINT).build();
          EmployeesAPI employeesAPI =adapter.create(EmployeesAPI.class);
          employeesAPI.getEmployees(new Callback&lt;List&lt;Employees.employeesclass&gt;&gt;() {
              @Override
              public void success(List&lt;Employees.employeesclass&gt; employees, Response response) {
                  List&lt;String&gt; names = new ArrayList&lt;String&gt;();
                  Log.v("nas", "The Employees Webservice Success" + response);
              }
  
              @Override
              public void failure(RetrofitError retrofitError) {
                  Log.v("nas", "The Employees Webservice Failed " + retrofitError);
              }
          });
      }
  </code></pre>
  
  <p>Employees.java </p>
  
  <pre><code>public class Employees {
  // List&lt;String&gt; listOfStrings = new ArrayList&lt;String&gt;();
  @SerializedName(value="employees")
  public List&lt;Employees&gt; employees;
  
  public void setEmployees(List&lt;Employees&gt; employees) {
      this.employees = employees;
  
  }
  
  public static class employeesclass {
      String firstName;
      String lastName;
  
  
      @Override
      public String toString() {
          return (firstName + " " + lastName);
  
      }
  }
  
  }
  </code></pre>
  
  <p>EmployeesAPI.java </p>
  
  <pre><code>public interface EmployeesAPI {
  @GET("/get_names.json")
  public void getEmployees(Callback&lt;List&lt;Employees.employeesclass&gt;&gt; response);
  }
  </code></pre>
  
  <p>the error im getting is      </p>
  
  <pre><code>The Employees Webservice Failed retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
  </code></pre>
  
  <p>I understand the error is saying the data is an object and it should start with an array but I cant work it out.. Thanks </p>