Retrofit: pass custom arraylist to Retrofit in post Request

I want to pass a custom arraylist to retrofit and my json format is

{
  "ProjectID": 1,
  "Iteration": [
    {
      "IterationName": "Wits",
      "StartDate": "yyyy-MM-dd HH:mm:ss.SSSZ",
      "ReleaseDate": "yyyy-MM-dd HH:mm:ss.SSSZ",
      "Status": "Completed",
      "Type": "Internal"
    },
    {
      "IterationName": "Wits",
      "StartDate": "yyyy-MM-dd HH:mm:ss.SSSZ",
      "ReleaseDate": "yyyy-MM-dd HH:mm:ss.SSSZ",
      "Status": "Running",
      "Type": "Client"
    }
  ]
}

I have searched online and i got only how to pass Custom objects by using body tag. But not on arraylist with custom objects.

Source: java

Leave a Reply