(Quick Reference)

3.1 Upgrading from Grails 3.2

Version: 3.2.9

3.1 Upgrading from Grails 3.2

If you are upgrading from Grails 3.2 there are a few items to take into consideration.

Legacy Converters API Separated From Core

Since the addition of json views, the previous way to convert objects to JSON has been considered legacy. In Grails 3.3 the code to support the legacy converters has been moved out of core and into a separate plugin. That means that by default, code that uses grails.converters.JSON or grails.converters.XML will no longer work by default.

Common usages of this feature are render(book as JSON).

If your codebase uses the legacy converters it is encouraged to convert the functionality to use JSON views, however you can add a dependency in your code to allow current usages of the converters to work again.

build.gradle
    compile "org.grails.plugins:grails-plugin-converters"
The support to build JSON directly from the render method no longer supports the old API and any code that used it will need to be converted to use the groovy.json.StreamingJsonBuilder syntax.

The support for rendering with the previous API was disabled by default in 3.1 and was able be re-enabled with the grails.json.legacy.builder: true setting. That setting has been removed in Grails 3.3.