最佳答案
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 foo as JSON
But in plain groovy, I cannot find an easy way to do this (http://groovy-lang.org/json.html)
JSONObject.fromObject(this)
return empty json strings...
Am I missing an obvious Groovy converter ? Or should I go for jackson or gson library ?