Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

#11 docs

  • Loading branch information...
1 parent 49e2bda commit 07ee07ebacab2eb6ada1c568a4cd1bd110538c86 robfletcher committed
Showing with 9 additions and 0 deletions.
  1. +9 −0
@@ -312,6 +312,14 @@ The plugin supports a few configurable options. Where equivalent configuration a
* **grails.converters.gson.dateStyle** and **grails.converters.gson.timeStyle** specify the style used to format `java.util.Date` objects in serialized output. See [`GsonBuilder.setDateFormat(int, int)`][24]. The values should be one of the `int` constants - `SHORT`, `MEDIUM`, `LONG` or `FULL` - from [`java.text.DateFormat`][25]. Note that Gson does not have a way to specify a _locale_ for the format so [`Locale.US`][26] is always used. For more control over the format use _grails.converters.gson.datePattern_ or register a custom `TypeAdapterFactory`.
+## RESTful controllers with GSON
+The GSON plugin includes a scaffolding template for RESTful controllers designed to work with Grails' [resource style URL mappings][27]. To install the template run:
+ grails install-gson-templates
+This will overwrite any existing file in `src/templates/scaffoldng/Controller.groovy`. You can then generate RESTful controllers that use GSON using the normal dynamic or static scaffolding capabilities.
## Version history
### [1.0.1](
@@ -351,3 +359,4 @@ Initial release.
[24]:, int)

0 comments on commit 07ee07e

Please sign in to comment.
Something went wrong with that request. Please try again.