This is wrong,
Headers responseHeaders = response.headers();
for (int i = 0, size = responseHeaders.size(); i < size; i++) {
System.out.println(responseHeaders.name(i) + responseHeaders.value(i));
}
You are trying to find the name, id, etc. data in the headers, while the information is in the body of the response.
Just create a POJO for your data model and retrieve the information into the model from the response object. Then you can just simply use getters and setters to access your required data.
UPDATE
You can create your POJO easily using this site, http://www.jsonschema2pojo.org. Just copy and paste your JSON and it will generate the POJOs for you instantly.
Now once you have the POJO, you can either manually parse it or use GSON or Jackson library to do it easily.
UPDATE 2
The error is quite self-explanatory here,
Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1
It clearly states that the parser expected an array but found an object in the actual JSON.
See the actual JSON, it starts with an object and not an array, so why are you using List here,
Call<List<Item>> getArtists();
If you look at your JSON you can see that it starts with an object, inside which you have another object with key "artists" and then you have a list of items with key "items".
You also didn't need to do anything manually. www.jsonschema2pojo.org would have generated everything for you, you just had to include them.
I don't understand why you have included a List instead of an object.
UPDATE 3
Getters man, simple getters.
Suppose you have this, suppose.
class Data {
Artists artists;
Artists getArtists() {
return artists;
}
class Artists {
List<Item> list;
List<Item> getItemList(){
return list;
}
}
class Item {
// You have your item class here
}
}
Now do this,
Call<Data> getArtists();
and to get items,
data.getArtists().getItemList();
Is that now clear?