DefaultJsonRenderer (Grails 6.0.0)

Package: org.grails.plugins.web.rest.render.json

## [Groovy] Class DefaultJsonRenderer<T>

- org.grails.plugins.web.rest.render.json.DefaultJsonRenderer

- All Implemented Interfaces and Traits:
    Renderer<T>

      @groovy.transform.CompileStatic
      class DefaultJsonRenderer<T>
      extends java.lang.Object
      implements Renderer<T>

  Default renderer for JSON

  Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.lang.String` | `encoding` |
    `private org.springframework.http.HttpStatus` | `errorsHttpStatus` |
    `private org.grails.web.gsp.io.GrailsConventionGroovyPageLocator` | `groovyPageLocator` |
    `private MimeType[]` | `mimeTypes` |
    `private java.lang.String` | `namedConfiguration` |
    `private RendererRegistry` | `rendererRegistry` |
    `private java.lang.Class<T>` | `targetType` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.String` | `encoding`
    `org.springframework.http.HttpStatus` | `errorsHttpStatus`
    `org.grails.web.gsp.io.GrailsConventionGroovyPageLocator` | `groovyPageLocator`
    `MimeType[]` | `mimeTypes`
    `java.lang.String` | `namedConfiguration`
    `RendererRegistry` | `rendererRegistry`
    `java.lang.Class<T>` | `targetType`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultJsonRenderer (java.lang.Class<T> targetType)`
    `DefaultJsonRenderer (java.lang.Class<T> targetType, MimeType[] mimeTypes)`
    `DefaultJsonRenderer (java.lang.Class<T> targetType, org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator)`
    `DefaultJsonRenderer (java.lang.Class<T> targetType, org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator, RendererRegistry rendererRegistry)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `render(T object, RenderContext context)`
    `` | `protected void` | `renderJson(T object, RenderContext context)` Subclasses should override to customize JSON response rendering
    `` | `protected void` | `renderJson(grails.converters.JSON converter, RenderContext context)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()`

- - ### Field Detail

    - #### private java.lang.String encoding

    - #### private org.springframework.http.HttpStatus errorsHttpStatus

    - #### @org.springframework.beans.factory.annotation.Autowired(required: false) private org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator

    - #### private MimeType[] mimeTypes

    - #### private java.lang.String namedConfiguration

    - #### @org.springframework.beans.factory.annotation.Autowired(required: false) private RendererRegistry rendererRegistry

    - #### private final java.lang.Class<T> targetType

  - ### Property Detail

    - #### java.lang.String encoding

    - #### org.springframework.http.HttpStatus errorsHttpStatus

    - #### @org.springframework.beans.factory.annotation.Autowired(required: false) org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator

    - #### MimeType[] mimeTypes

    - #### java.lang.String namedConfiguration

    - #### @org.springframework.beans.factory.annotation.Autowired(required: false) RendererRegistry rendererRegistry

    - #### final java.lang.Class<T> targetType

  - ### Constructor Detail

    - #### DefaultJsonRenderer(java.lang.Class<T> targetType)

    - #### DefaultJsonRenderer(java.lang.Class<T> targetType, MimeType[] mimeTypes)

    - #### DefaultJsonRenderer(java.lang.Class<T> targetType, org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator)

    - #### DefaultJsonRenderer(java.lang.Class<T> targetType, org.grails.web.gsp.io.GrailsConventionGroovyPageLocator groovyPageLocator, RendererRegistry rendererRegistry)

  - ### Method Detail

    - #### @java.lang.Override void render(T object, RenderContext context)

    - #### protected void renderJson(T object, RenderContext context)

      Subclasses should override to customize JSON response rendering

      Parameters:
        object
        context

    - #### protected void renderJson(grails.converters.JSON converter, RenderContext context)