@GrabResolver("https://oss.jfrog.org/artifactory/repo") @Grab("io.ratpack:ratpack-groovy:0.9.9") import static ratpack.groovy.Groovy.ratpack import groovy.json.JsonBuilder // You can change anything in the ratpack {} closure without needing to restart ratpack { handlers { get { def data = [ [firstname: 'Guillaume', lastname: 'Laforge'], [firstname: 'Cédric', lastname: 'Champeau'], [firstname: 'Bertrand', lastname: 'Goetzmann'] ] def builder = new JsonBuilder([users: data]) response.send 'application/json', builder.toString() } } }