I have an end point for getting all objects from a given table/data_type. I want to add some filtering capabilities on the data returned but am unable to figure out how to pass a JSON object to my controller.
my code:
@RequestMapping(value = "/{dataType}.json", method = RequestMethod.GET)
public @ResponseBody List findAll(@PathVariable String dataType, @RequestParam(required=false) Map<String, Object> query) {
}
How can I pass data to query parameter? I tried @ModelAttribute and sent the JSON object in request body but it did not work.
Please help me figure this out