I found that Grails 3.2+ supports json views which provides an elegant way for the response to have json.
So is there a way such that instead of having the ".json" in the request URL, we render a custom JSON template from the controller. I tried using the render method, but keep getting an error that the template could not be found. Additionally reading through the documentation I can't seem to find a way to do this. Is this something that is supported yet?