Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-1-23 22:35

Class JsonResponse

Class Summary
Constructor Attributes Constructor Name and Description
 
JsonResponse(entity, wrap)
Creates a new JSON response for the given entity object.

Method Summary

Method Attributes Method Name and Description
 
Returns the source object for this response.
 
Returns the JSON-encoded entity.
 
Returns the request wrapping for this JSON response.
 
sendBody(stream)
Renders into the given writable stream.
 
setEntity(entity)
Sets the entity object for this response.
 
setWrap(style)
Sets the wrapping style.
Methods borrowed from class Response:
enableCaching
forceDownload
getContentType
getHeader
getHeaders
getLastModified
removeHeader
setContentType
setHeader

Class Detail

JsonResponse(entity, wrap)
Creates a new JSON response for the given entity object.
Parameters:
entity
wrap
optional wrapping style

Method Detail

  • getEntity()
    Returns the source object for this response.
    Returns:
    object
  • getJson()
    Returns the JSON-encoded entity.
    Returns:
    object
  • getWrap()
    Returns the request wrapping for this JSON response.
    Returns:
    int
  • sendBody(stream)
    Renders into the given writable stream. // todo rename? sendBody? render? write sounds like you're mutating this object
    Parameters:
    stream
  • setEntity(entity)
    Sets the entity object for this response.
    Parameters:
    entity
  • setWrap(style)
    Sets the wrapping style.
    Parameters:
    style
    the wrapping style to use