cachebox.system.core.conversion

Class DataMarshaller

lucee.Component
    extended by cachebox.system.core.conversion.DataMarshaller

Ability to serialize/deserialize data.

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any xmlConverter


    • access = public
    • returntype = any
    • 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='true'], [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 lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Property Detail

    xmlConverter

    property any xmlConverter

    Attributes:
    access - public
    required - false
    returntype - any
    inject - xmlConverter@coldbox
    serializable - true

    Method Detail

    marshallData

    public any marshallData(string type, any data, [string encoding='utf-8'], [string jsonCallback=''], [string jsonQueryFormat='true'], [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: This parameter can be a Boolean value that specifies how to serialize ColdFusion queries or a string with possible values row, column, or struct
    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