I have a API endpoint method like this:
@ApiMethod(name = "test")
public TestModel test(@Named("testArray") ArrayList<String> myTest) {
for (String i:myTest){
log.warning("i=="+i);
}
A request is made as such:
{
"testArray":[
"ID1",
"ID2"
]
}
However, when I check my log (and also the problems this caused in my app), I see
i=="ID1,ID2"
not how i expected to see:
i=="ID1"
i=="ID2"
as the output. It is putting both elements of the array into myTest(0). How do I populate the Array correctly?