I\'m pretty used to Grails converters, where you can convert any object to a JSON representation just like this (http://grails.org/Converters+Reference)
return f
Do you mean like:
import groovy.json.* class Me { String name } def o = new Me( name: 'tim' ) println new JsonBuilder( o ).toPrettyString()