JSON output of a view in Grails

Posted by daliz on Stack Overflow See other posts from Stack Overflow or by daliz
Published on 2010-05-03T12:35:46Z Indexed on 2010/05/03 12:38 UTC
Read the original article Hit count: 289

Filed under:
|
|
|

Ok, I have a very simple app created in Grails. I have a generated domain class (Person) and its generated controller, using the automatic Grails scaffold:

package contacts

class PersonController {

    def scaffold = Person

}

Now I'd like to get a JSON representation of a Person object.

Do I have to change the view or the controller? And how?

Thank you.

© Stack Overflow or respective owner

Related posts about grails

Related posts about controller