I wanted to use converters to instantly get a POJO from the response, but the root JSON object is not that one what I want to deserialize to a POJO. In fact I want to deserialize it's 2 sibling objects into a POJO.

For example get a stream from the new Twitch API:

```
@GET("/helix/streams?first=1")
Call<TwitchStream> getLatestStreamsForGame(@Query("game_id") int gameId);

```

The response will be something like that:

```
{
  "data": [
    {
      "id": "26007494656",
      "user_id": "23161357",
      "game_id": "417752",
      "community_ids": [
        "5181e78f-2280-42a6-873d-758e25a7c313",
        "848d95be-90b3-44a5-b143-6e373754c382",
        "fd0eab99-832a-4d7e-8cc0-04d73deb2e54"
      ],
      "type": "live",
      "title": "Hey Guys, It's Monday - Twitter: @Lirik",
      "viewer_count": 32575,
      "started_at": "2017-08-14T16:08:32Z",
      "language": "en",
      "thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_lirik-{width}x{height}.jpg"
    },
    ...
  ],
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ=="
  }
}

```

And this is the class in which I want to store the data of a stream:

```
public class TwitchStream extends DataResponse{
    @SerializedName("id")
    private String id;
    @SerializedName("user_id")
    private String userId;
    @SerializedName("game_id")
    private String gameId;
    @SerializedName("community_ids")
    private List<String> communityIds;
    @SerializedName("type")
    private String type;
    @SerializedName("title")
    private String title;
    @SerializedName("viewer_count")
    private int viewerCount;
    @SerializedName("started_at")
    private String startedAt;
    @SerializedName("language")
    private String language;
    @SerializedName("thumbnail_url")
    private String thumbnailUrl;
    @SerializedName("cursor")
    private String paginationCursor;

    public TwitchStream(String id, String user_id, String game_id, List<String> community_ids, String type, String title, int viewer_count, String started_at, String language, String thumbnail_url, String paginationCursor) {
        this.id = id;
        this.userId = user_id;
        this.gameId = game_id;
        this.communityIds = community_ids;
        this.type = type;
        this.title = title;
        this.viewerCount = viewer_count;
        this.startedAt = started_at;
        this.language = language;
        this.thumbnailUrl = thumbnail_url;
        this.paginationCursor = paginationCursor;
    }

    public String getId() {
        return id;
    }

    public String getUserId() {
        return userId;
    }

    public String getGameId() {
        return gameId;
    }

    public List<String> getCommunityIds() {
        return communityIds;
    }

    public String getType() {
        return type;
    }

    public String getTitle() {
        return title;
    }

    public int getViewerCount() {
        return viewerCount;
    }

    public String getStartedAt() {
        return startedAt;
    }

    public String getLanguage() {
        return language;
    }

    public String getThumbnailUrl() {
        return thumbnailUrl;
    }

    public String getPaginationCursor() {
        return paginationCursor;
    }
}

```

I wanted to deserialize the contents of `data` into the above POJO, and I also need the cursor from `pagination`. I wanted to use `GsonConverterFactory`, but Gson wants to deserialize the root JSON object, and since it can't find any field in this class named or annotated as `data` and `pagination`, it had done nothing.

What could I do?
One solution is to make a wrapper class, and create the call this way:

```
@GET("/helix/streams?first=1")
Call<Wrapper<TwitchStream>> getLatestStreamsForGame(@Query("game_id") int gameId);

```

But this way I will get an exception:

```
ResponseBase failed: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
    at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:39)
    at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27)
    at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122)
    at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217)
    at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:116)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)
 Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data
    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) 
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) 
    at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:39) 
    at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27) 
    at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:122) 
    at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:217) 
    at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:116) 
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153) 
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
    at java.lang.Thread.run(Thread.java:818)
enter code here

```

An other option is to use `JSONParser` before Gson tries to deserialize the root JSON object, and only pass the `data` and the `pagination` object to Gson for deserialization. But how could I do that?