Question

I'm using Grails 2.3.6.

I have generated my controllers and views using:

grails generate-all com.mypackage.mydomainclass

I would like to disable automatic JSON/XML marshalling for domain objects and implement only my own services.

I have tried adding the following to my controller:

static responseFormats = ['html']

And it seems to work, is it the proper way?

Thanks.

No correct solution

OTHER TIPS

Based on the documentation, it looks like you are correct. Athough, it looks like they generally use it to extend support for other types by adding more types, whereas you are using it to limit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top