title: Retrofit - Expected BEGIN_OBJECT but was BEGIN_ARRAY Error
body: <p>I am making a call to a server using Retrofit and getting a json response. The error I'm getting is:</p>
  
  <pre><code>Expected BEGIN_OBJECT but was BEGIN_ARRAY
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>Main method,
  
  
  public class MainActivity extends ListActivity {
  
      List&lt;Movie&gt; movieList;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          final RestAdapter restadapter = new RestAdapter.Builder().setEndpoint("http://api.themoviedb.org").build();
  
          api movieapi = restadapter.create(api.class);
  
          movieapi.getData(new Callback&lt;List&lt;Movie&gt;&gt;() {
              @Override
              public void success(List&lt;Movie&gt; movies, Response response) {
                  movieList = movies;
  
                  adapter adapt = new adapter(getApplicationContext(),R.layout.item_file,movieList);
                  //ListView listView = (ListView) findViewById(R.id.list);
                  setListAdapter(adapt);
              }
  
              @Override
              public void failure(RetrofitError error) {
                  Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();
              }
          });
  
  
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_main, menu);
  
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  </code></pre>
  
  <p>Interface api </p>
  
  <pre><code>public interface api {
  
      @GET("/3/discover/movie?sort_by=popularity.desc&amp;api_key=e2a804764747474747474574817b218e")
      public void getData(Callback&lt;List&lt;Movie&gt;&gt; response);
  
  }
  </code></pre>
  
  <p>class adapter </p>
  
  <pre><code>public class adapter extends ArrayAdapter&lt;Movie&gt; {
  
      String url = "http://image.tmdb.org/t/p/w185";
      private Context context;
      private List&lt;Movie&gt; movieList;
      public adapter(Context context, int resource, List&lt;Movie&gt; objects) {
          super(context, resource, objects);
          this.context = context;
          this.movieList = objects;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
          View view = inflater.inflate(R.layout.item_file,parent,false);
          Movie movie = movieList.get(position);
          TextView tv = (TextView) view.findViewById(R.id.name);
          tv.setText(movie.getTitle());
          ImageView img = (ImageView) view.findViewById(R.id.img);
          Picasso.with(getContext()).load(url+movie.getPoster_path()).into(img);
          return view;
      }
  }
  </code></pre>
  
  <p>Movie class (Where I handle the getters setters for json)</p>
  
  <pre><code>   package com.wuno.moviesapp.model;
  
  
  public class Movie
  {
      private String vote_average;
  
      private String backdrop_path;
  
      private String adult;
  
      private String id;
  
      private String title;
  
      private String original_language;
  
      private String overview;
  
      private String[] genre_ids;
  
      private String original_title;
  
      private String release_date;
  
      private String vote_count;
  
      private String poster_path;
  
      private String video;
  
      private String popularity;
  
      public String getVote_average ()
      {
          return vote_average;
      }
  
      public void setVote_average (String vote_average)
      {
          this.vote_average = vote_average;
      }
  
      public String getBackdrop_path ()
      {
          return backdrop_path;
      }
  
      public void setBackdrop_path (String backdrop_path)
      {
          this.backdrop_path = backdrop_path;
      }
  
      public String getAdult ()
      {
          return adult;
      }
  
      public void setAdult (String adult)
      {
          this.adult = adult;
      }
  
      public String getId ()
      {
          return id;
      }
  
      public void setId (String id)
      {
          this.id = id;
      }
  
      public String getTitle ()
      {
          return title;
      }
  
      public void setTitle (String title)
      {
          this.title = title;
      }
  
      public String getOriginal_language ()
      {
          return original_language;
      }
  
      public void setOriginal_language (String original_language)
      {
          this.original_language = original_language;
      }
  
      public String getOverview ()
      {
          return overview;
      }
  
      public void setOverview (String overview)
      {
          this.overview = overview;
      }
  
      public String[] getGenre_ids ()
      {
          return genre_ids;
      }
  
      public void setGenre_ids (String[] genre_ids)
      {
          this.genre_ids = genre_ids;
      }
  
      public String getOriginal_title ()
      {
          return original_title;
      }
  
      public void setOriginal_title (String original_title)
      {
          this.original_title = original_title;
      }
  
      public String getRelease_date ()
      {
          return release_date;
      }
  
      public void setRelease_date (String release_date)
      {
          this.release_date = release_date;
      }
  
      public String getVote_count ()
      {
          return vote_count;
      }
  
      public void setVote_count (String vote_count)
      {
          this.vote_count = vote_count;
      }
  
      public String getPoster_path ()
      {
          return poster_path;
      }
  
      public void setPoster_path (String poster_path)
      {
          this.poster_path = poster_path;
      }
  
      public String getVideo ()
      {
          return video;
      }
  
      public void setVideo (String video)
      {
          this.video = video;
      }
  
      public String getPopularity ()
      {
          return popularity;
      }
  
      public void setPopularity (String popularity)
      {
          this.popularity = popularity;
      }
  
      @Override
      public String toString()
      {
          return "Movie [vote_average = "+vote_average+", backdrop_path = "+backdrop_path+", adult = "+adult+", id = "+id+", title = "+title+", original_language = "+original_language+", overview = "+overview+", genre_ids = "+genre_ids+", original_title = "+original_title+", release_date = "+release_date+", vote_count = "+vote_count+", poster_path = "+poster_path+", video = "+video+", popularity = "+popularity+"]";
      }
  }
  </code></pre>