coldbox.system.core.conversion

Class DataMarshaller

railo-context.Component
        extended by coldbox.system.core.conversion.DataMarshaller
Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  

    Ability to serialize/deserialize data.

    Property Summary
    type property default serializable required
    any xmlConverter


    • inject = xmlConverter@coldbox
    true false
    Constructor Summary
    init()
          Constructor.
    Method Summary
    any marshallData(string type, any data, [string encoding='utf-8'], [string jsonCallback=''], [string jsonQueryFormat='query'], [string xmlColumnList=''], [boolean xmlUseCDATA='false'], [string xmlListDelimiter=','], [string xmlRootName=''], [struct pdfArgs='[runtime expression]'])
         Marshall data according to types or conventions on data objects.
    any renderContent(any type, [any variable], [any encoding='utf-8'], [boolean reset='false'])
         Facade to cfcontent as stupid CF does not allow via script.
    any resetContent()
         Reset the CF content.
     
    Methods inherited from class railo-context.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    xmlConverter

    property any xmlConverter

    Attributes:
    required - false
    inject - xmlConverter@coldbox
    serializable - true

    Method Detail

    marshallData

    public any marshallData(string type, any data, [string encoding='utf-8'], [string jsonCallback=''], [string jsonQueryFormat='query'], [string xmlColumnList=''], [boolean xmlUseCDATA='false'], [string xmlListDelimiter=','], [string xmlRootName=''], [struct pdfArgs='[runtime expression]'])

    Marshall data according to types or conventions on data objects.

    Parameters:
    type - The type to marshal to. Valid values are JSON, XML, WDDX, PLAIN, HTML, TEXT
    data - The data to marshal
    encoding - The default character encoding to use
    jsonCallback - Only needed when using JSONP, this is the callback to add to the JSON packet
    jsonQueryFormat - JSON Only: query or array
    xmlColumnList - XML Only: Choose which columns to inspect, by default it uses all the columns in the query, if using a query
    xmlUseCDATA - XML Only: Use CDATA content for ALL values. The default is false
    xmlListDelimiter - XML Only: The delimiter in the list. Comma by default
    xmlRootName - XML Only: The name of the initial root element of the XML packet
    pdfArgs - All the PDF arguments to pass along to the CFDocument tag.

    renderContent

    public any renderContent(any type, [any variable], [any encoding='utf-8'], [boolean reset='false'])

    Facade to cfcontent as stupid CF does not allow via script

    Parameters:
    type - The content type
    variable - The variable to render content from
    encoding - The encoding
    reset - Reset the conten or not

    resetContent

    public any resetContent()

    Reset the CF content