10.1.8.4 Rendering Domain Classes with JSON Views - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.4
10.1.8.4 Rendering Domain Classes with JSON Views
Typically your model may involve one or many domain instances. JSON views provide a render method for rendering these.For example given the following domain class:class Book {
    String title
}model {
    Book book
}json g.render(book){id:1,"title":"The Stand"}json g.render(book, [includes:['title']])
json g.render(book) {
    pages 1000
}