JsonDataBindingSourceCreator (Grails 2.3.8)
Date: 2014-04-24

Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.binding.bindingsource
[Groovy] Class JsonDataBindingSourceCreator

    java.lang.Object
      org.codehaus.groovy.grails.web.binding.bindingsource.DefaultDataBindingSourceCreator
          org.grails.databinding.bindingsource.AbstractRequestBodyDataBindingSourceCreator
              org.codehaus.groovy.grails.web.binding.bindingsource.JsonDataBindingSourceCreator

    @groovy.transform.CompileStatic
    class JsonDataBindingSourceCreator
    extends AbstractRequestBodyDataBindingSourceCreator

Creates DataBindingSource objects from JSON in the request body

Authors:
  Jeff Brown
  Graeme Rocher

See Also:
  DataBindingSource
  DataBindingSourceCreator

Since:
  2.3

Nested Class Summary
`class` | `JsonDataBindingSourceCreator.JsonArrayList`
`class` | `JsonDataBindingSourceCreator.JsonObjectMap`

Property Summary
`com.google.gson.Gson` | `gson`

Method Summary
`protected DataBindingSource` | `createBindingSource(java.io.Reader reader)`
`protected DataBindingSourceCreationException` | `createBindingSourceCreationException(java.lang.Exception e)`
`protected CollectionDataBindingSource` | `createCollectionBindingSource(java.io.Reader reader)`
`DataBindingSource` | `createDataBindingSource(MimeType mimeType, java.lang.Class bindingTargetType, java.lang.Object bindingSource)`
`protected java.util.Map` | `createJsonObjectMap(com.google.gson.JsonElement jsonElement)` Returns a map for the given JsonElement.
`MimeType[]` | `getMimeTypes()`
`java.lang.Object` | `getValueForJsonElement(com.google.gson.JsonElement value, com.google.gson.Gson gson)`

Methods inherited from class AbstractRequestBodyDataBindingSourceCreator
createBindingSource, createBindingSource, createBindingSourceCreationException, createCollectionBindingSource, createCollectionBindingSource, createCollectionDataBindingSource, createDataBindingSource, getTargetType

Methods inherited from class DefaultDataBindingSourceCreator
createCollectionDataBindingSource, createDataBindingSource, createDataBindingSource, getMimeTypes, getTargetType

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### gson

    @org.springframework.beans.factory.annotation.Autowired(required = false)
    com.google.gson.Gson gson

Method Detail

### createBindingSource

    @java.lang.Override
    protected DataBindingSource createBindingSource(java.io.Reader reader)

### createBindingSourceCreationException

    @java.lang.Override
    protected DataBindingSourceCreationException createBindingSourceCreationException(java.lang.Exception e)

### createCollectionBindingSource

    @java.lang.Override
    protected CollectionDataBindingSource createCollectionBindingSource(java.io.Reader reader)

### createDataBindingSource

    @java.lang.Override
    DataBindingSource createDataBindingSource(MimeType mimeType, java.lang.Class bindingTargetType, java.lang.Object bindingSource)

### createJsonObjectMap

    protected java.util.Map createJsonObjectMap(com.google.gson.JsonElement jsonElement)

  Returns a map for the given JsonElement. Subclasses can override to customize the format of the map
  Parameters:
    `jsonElement` - The JSON element
  Returns:
    The map

### getMimeTypes

    @java.lang.Override
    MimeType[] getMimeTypes()

### getValueForJsonElement

    java.lang.Object getValueForJsonElement(com.google.gson.JsonElement value, com.google.gson.Gson gson)

Groovy Documentation