title: Retrofit2 Android: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
body: <p>I know this is not the first time someone asking about this problem but with Retrofit2 I can't find the right solution to my problem. I followed a online tutorial and it worked just fine. When I applied same code to my own endpoint i get this exception: <code>java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $</code> I don't know how to solve this.</p>
  
  <p>Interface:</p>
  
  <pre><code>public interface MyApiService {
  
  // Is this right place to add these headers?
  @Headers({"application-id: MY-APPLICATION-ID",
          "secret-key: MY-SECRET-KEY",
          "application-type: REST"})
  @GET("Music")
  Call&lt;List&lt;Music&gt;&gt; getMusicList();
  
  
  
  Retrofit retrofit = new Retrofit.Builder()
          .baseUrl(MySettings.REST_END_POINT)
          .addConverterFactory(GsonConverterFactory.create())
          .build();
  }
  </code></pre>
  
  <p>Client code:</p>
  
  <pre><code>MyApiService service = MyApiService.retrofit.create(MyApiService.class);
  Call&lt;List&lt;Music&gt;&gt; call = service.getMusicList();
  call.enqueue(new Callback&lt;List&lt;Music&gt;&gt;() {
  
      @Override
      public void onResponse(Call&lt;List&lt;Music&gt;&gt; call, Response&lt;List&lt;Music&gt;&gt; response) {
          Log.e("MainActivity", response.body().
      }
  
      @Override
      public void onFailure(Call&lt;List&lt;Music&gt;&gt; call, Throwable t) {
          Log.e("MainActivity", t.toString());
      }
  });
  </code></pre>
  
  <p>This code working with this payload:</p>
  
  <pre><code>[
  {
      "login": "JakeWharton",
      "id": 66577,
      "avatar_url": "https://avatars.githubusercontent.com/u/66577?v=3",
      "gravatar_id": "",
      "url": "https://api.github.com/users/JakeWharton",
      "html_url": "https://github.com/JakeWharton",
      "followers_url": "https://api.github.com/users/JakeWharton/followers",
      "following_url": "https://api.github.com/users/JakeWharton/following{/other_user}",
      "gists_url": "https://api.github.com/users/JakeWharton/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/JakeWharton/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/JakeWharton/subscriptions",
      "organizations_url": "https://api.github.com/users/JakeWharton/orgs",
      "repos_url": "https://api.github.com/users/JakeWharton/repos",
      "events_url": "https://api.github.com/users/JakeWharton/events{/privacy}",
      "received_events_url": "https://api.github.com/users/JakeWharton/received_events",
      "type": "User",
      "site_admin": false,
      "contributions": 741
  },
  {....
  </code></pre>
  
  <p>but not with this one:</p>
  
  <pre><code>{
  "offset": 0,
  "data": [
      {
          "filename": "E743_1458662837071.mp3",
          "created": 1458662854000,
          "publicUrl": "https://api.backendless.com/dbb77803-1ab8-b994-ffd8-65470fa62b00/v1/files/music/E743_1458662837071.mp3",
          "___class": "Music",
          "description": "",
          "likeCount": 0,
          "title": "hej Susanne. ",
          "ownerId": "E743756F-E114-6892-FFE9-BCC8C072E800",
          "updated": null,
          "objectId": "DDD8CB3D-ED66-0D6F-FFA5-B14543ABC800",
          "__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"filename\",\"created\",\"publicUrl\",\"___class\",\"description\",\"likeCount\",\"title\",\"ownerId\",\"updated\",\"objectId\"],\"relatedObjects\":{}}"
      },
      {...
  </code></pre>
  
  <p>My Music class:</p>
  
  <pre><code>public class Music {
  
     private String ownerId;
     private String filename;
     private String title;
     private String description;
     private String publicUrl;
     private int likeCount;
  
     // Getters &amp; Setters
  
  }
  </code></pre>