Posts List

Grails 2.3 exclude class in json/xml renderer not working

Recently I started to play with Grails 2.3.4 and discovered a lot of nice features around REST, grails team did really good progress here. When I was playing I noticed that I always had “class” field in JSON returned to me by grails server when I checked the doc, it was saying that you need to setup JSON renderer like this in resources.groovy file: import // Place your Spring DSL code here beans = { deviceRenderer(JsonRenderer, Device) { excludes = ['class'] } } But when I tried it, it did not work.