Show Navigation

Quickcast #2: JSON Views

By Jeff Scott Brown

April 1, 2016

Tags: #quickcast #json

In a delightful and informative 15 minutes, the Grails® framework co-founder, Jeff Scott Brown, probes JSON views.

Beginning with a Grails 3.1.1 application created with a standard web profile, Jeff demonstrates how to add a few custom domain classes.

Jeff uses music examples, including Space Oddity by David Bowie (RIP) and Close to the Edge by Yes, to populate an artist class with associated albums annotated with

The goal is to publish a REST API under /artists to manage instances of the artist class and to support the JSON and XML formats. Sending a request to /artists delivers a list of artists, all of whom have albums associated with them.

While the app is running in development mode, the JSON files can be altered, and the effects of those changes can be seen real-time in the application.

This Quickcast assumes basic knowledge of Grails, JSON, and REST APIs.

Grails Quickcasts, brought to you through a partnership between Object Computing, Inc. (OCI) and DZone, provide bite-sized tutorials to help you maximize your productivity with the Framework.

You might also like ...