Grails JSONBuilder
I finally figured out how to do this using a JSONBuilder, here’s the code import grails.web.* class JSONSerializer { def target String getJSON() { Closure jsonFormat = { object = { // Set the delegate of buildJSON to ensure that missing methods called thereby are routed to the JSONBuilder buildJSON.delegate = delegate buildJSON(target) } } … Read more