Im using REST in my webservice. This is the example payload/parameter i sent when i test my webservice using advance rest client, with form content type (this is the RAW type):
child_id%5B%5D=1&user_id=15&group_id=1&custom=&time=17%3A17%3A00&date=&child_id%5B%5D=2
Where child_id%5B%5D in RAW means child_id[] in the form, so i send an array of child_id (left most and right most in above form). Things are fine here.
The problem occured when i tried to implement this to the Android apps, where i POST those payload/parameter using a HashMap. HashMap cant store two values under the same key, so i cant do something like :
map.put("child_id[]", 1);
map.put("child_id[]", 2);
The latest put will overwrite the earlier put, so the Android apps will only send 2 as value of the child_id.
What should i do? Thanks for your help
Collection?HashMapis also aCollection. AnArrayListis probably what you want.