score:2

Accepted answer

render as JSON in controller should be helpful in this case.
If your response can be represented as a map or list, then use

import grails.converter.JSON

render myRespone as JSON

In case you need the response to be rendered in different formats, withFormat can be used to suffice the purpose.


Related Query

More Query from same tag