def index() { def all = Product.list() withFormat { json { JSON.use("deep"){ def c = all as JSON c.prettyPrint = true render c } } xml { XML.use("deep"){ render all as XML } } } }After figuring this out I also discovered the JSON View extension for Chrome, which negated my need for pretty printing JSON.
No comments:
Post a Comment