DefaultJsonRenderer (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.grails.plugins.web.rest.render.json
[Groovy] Class DefaultJsonRenderer

    java.lang.Object
      org.grails.plugins.web.rest.render.json.DefaultJsonRenderer

All Implemented Interfaces:
  Renderer

    @groovy.transform.CompileStatic
    class DefaultJsonRenderer
    extends java.lang.Object

Default renderer for JSON

Authors:
  Graeme Rocher

Since:
  2.3

Property Summary
`java.lang.String` | `encoding`
`org.springframework.http.HttpStatus` | `errorsHttpStatus`
`GrailsConventionGroovyPageLocator` | `groovyPageLocator`
`MimeType[]` | `mimeTypes`
`java.lang.String` | `namedConfiguration`
`RendererRegistry` | `rendererRegistry`
`java.lang.Class` | `targetType`

Constructor Summary
`DefaultJsonRenderer(java.lang.Class targetType)`
`DefaultJsonRenderer(java.lang.Class targetType, MimeType... mimeTypes)`
`DefaultJsonRenderer(java.lang.Class targetType, GrailsConventionGroovyPageLocator groovyPageLocator)`
`DefaultJsonRenderer(java.lang.Class targetType, GrailsConventionGroovyPageLocator groovyPageLocator, RendererRegistry rendererRegistry)`

Method Summary
`void` | `render(java.lang.Object object, RenderContext context)`
`protected void` | `renderJson(java.lang.Object object, RenderContext context)` Subclasses should override to customize JSON response rendering
`protected void` | `renderJson(JSON converter, RenderContext context)`

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

### encoding

    java.lang.String encoding

### errorsHttpStatus

    org.springframework.http.HttpStatus errorsHttpStatus

### groovyPageLocator

    @org.springframework.beans.factory.annotation.Autowired(required = false)
    GrailsConventionGroovyPageLocator groovyPageLocator

### mimeTypes

    MimeType[] mimeTypes

### namedConfiguration

    java.lang.String namedConfiguration

### rendererRegistry

    @org.springframework.beans.factory.annotation.Autowired(required = false)
    RendererRegistry rendererRegistry

### targetType

    final java.lang.Class targetType

Constructor Detail

### DefaultJsonRenderer

    DefaultJsonRenderer(java.lang.Class targetType)

### DefaultJsonRenderer

    DefaultJsonRenderer(java.lang.Class targetType, MimeType... mimeTypes)

### DefaultJsonRenderer

    DefaultJsonRenderer(java.lang.Class targetType, GrailsConventionGroovyPageLocator groovyPageLocator)

### DefaultJsonRenderer

    DefaultJsonRenderer(java.lang.Class targetType, GrailsConventionGroovyPageLocator groovyPageLocator, RendererRegistry rendererRegistry)

Method Detail

### render

    @java.lang.Override
    void render(java.lang.Object object, RenderContext context)

### renderJson

    protected void renderJson(java.lang.Object object, RenderContext context)

  Subclasses should override to customize JSON response rendering
  Parameters:
    object
    context

### renderJson

    protected void renderJson(JSON converter, RenderContext context)

Groovy Documentation