Currently I'm doing an API to fire JSON array of array to mysql. But I don't know how to receive the data to the model class when fire the API. I tried to use ArrayList[] but still cannot make it.
Here is the data that I need to fire.
Controller :
//insert Trip
@RequestMapping(value = "inserting", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody String add(@RequestBody ArrayList<Trips[]>[] c) {
LOGGER.debug("start insert to database...");
for(int i=0;i<c.length;i++){
//trip = c[i];
tripsService.saveTrips(trip);
}
LOGGER.debug("insert successfull...");
return c.toString();
}

