0

I am using Retrofit for my app. For a GET call ( name : /sequences/ ) I have to make an object for this JSONObject :

{
  "listeIds": [
    "12",
    "15",
    "23",
    "19",
    "94",
    "78",
    "87",
    "32"
  ]
}

So, my JSONObject contain one JSONArray named "listeIds".

I don't know how I can make an object called Sequences where I can put the listeIds.

Do I have to make an object in my object like this example ?

Community
  • 1
  • 1
Jéwôm'
  • 3,753
  • 5
  • 40
  • 73

1 Answers1

0

Assuming you use gson as converter, this should work for you.

public class Sequences {
    List<String> listeIds;
}
azizbekian
  • 60,783
  • 13
  • 169
  • 249