Commits

Jason Stonebraker committed 66725f2

Edited online

Comments (0)

Files changed (1)

 
 The JSON Exclusion Marshaller is a Grails plugin that allows you to easily exclude class properties from the JSON converter's output. It does this by injecting a convenience method, excludesFor*(...), into Grails' JSON converter class.
 
+## What problem does the plugin solve?
+The [grails.converters.JSON](http://grails.org/doc/latest/api/grails/converters/JSON.html) 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 and GroovyObject respectively) are not included in the JSON string. The plugin 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.
+
 ## Installation
 As a Dependency: 
 ```compile ":json-exclusion-marshaller:0.2"```
 You can specify a list of properties that should always be excluded by the JSON converter by adding a line like this to Config:
 `jsonExclusionMarshaller.globalExclusions = "attached, errors, properties, version, class, id"`
 
-## What problem does the plugin solve?
-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.
-
 ### Other resources and discussion surrounding this issue
 
 [GRAILS-5791: "Create a way to easily exclude properties from Serialization when using the XML or JSON converters"](http://jira.grails.org/browse/GRAILS-5791)