Files changed (1)
+'excludeForWhateverYouDecideToNameIt'. The Named Configuration then registers a custom ObjectMarshaller for the TestStudent domain class. The custom object marshaller is built into the `excludesFor*` sythesized method. It removes the properties we provided to it in the list. The JSON converter then outputs the desired JSON formatted string.
The grails.converter.JSON class is powerful. That power comes at the cost of some complexity though. This plugin utilizes Groovy's meta-programming features to simplify the common task of excluding arbitrary properties from the JSON payload at run-time. The most common use for this plugin will be to simply ensure that the 'id' and 'class' properties added by GORM are not included in the JSON string. Basically, it allows you to tackle this common task using expressive, domain specific language, quickly and simply. It also makes it simple to determine at run-time which properties to exclude.
[Rendering JSON in Grails: Part 3 Customise your JSON with Object Marshallers](http://manbuildswebsite.com/2010/02/15/rendering-json-in-grails-part-3-customise-your-json-with-object-marshallers/)
* Infer the class type of the target object rather than requiring it to be passed in. This is a challenge since the paradigm is based on static methods.