ColdBox Platform Version 2.6.3

coldbox.system.plugins
Class json

WEB-INF.cftags.component
        extended by coldbox.system.frameworkSupertype
            extended by coldbox.system.plugin
                extended by coldbox.system.plugins.json

public class json
extends plugin

JSON Plugin is used to serialize and deserialize JSON data to/from native ColdFusion objects.


Constructor Summary
init(any controller)
 
Method Summary
 any decode(string data)
          Converts data from JSON to CF format
 string encode(any data, [string queryFormat='query'], [string queryKeyCase='lower'], [boolean stringNumbers='false'], [boolean formatDates='false'], [string columnListFormat='string'], [string keyCase='lower'])
          Converts data from CF to JSON format
remote boolean validate([string doc], [string schema], [string errorVar='jsonSchemaErrors'], [boolean stopOnError='true'], [any _doc], [any _schema], [string _item='root'])
          I validate a JSON document against a JSON schema
 
Methods inherited from class coldbox.system.plugin
getPluginDescription, getPluginName, getPluginVersion, getpluginPath, setPluginDescription, setPluginName, setPluginVersion
 
Methods inherited from class coldbox.system.frameworkSupertype
abort, announceInterception, dump, getColdboxOCM, getDatasource, getDebugMode, getHash, getInstance, getInterceptor, getMailSettings, getModel, getMyPlugin, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getcontroller, getfwLocale, htmlhead, include, includeUDF, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, renderExternalView, renderView, rethrowit, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setcontroller, settingExists, throw
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any controller)

Method Detail

decode

public any decode(string data)
Converts data from JSON to CF format

Parameters:
data - JSON Packet

encode

public string encode(any data, [string queryFormat='query'], [string queryKeyCase='lower'], [boolean stringNumbers='false'], [boolean formatDates='false'], [string columnListFormat='string'], [string keyCase='lower'])
Converts data from CF to JSON format

Parameters:
data - The CF structure
queryFormat - query or array
queryKeyCase - lower or upper
stringNumbers
formatDates
columnListFormat - string or array
keyCase - lower or upper

validate

remote boolean validate([string doc], [string schema], [string errorVar='jsonSchemaErrors'], [boolean stopOnError='true'], [any _doc], [any _schema], [string _item='root'])
I validate a JSON document against a JSON schema

Parameters:
doc
schema
errorVar
stopOnError
_doc
_schema
_item

ColdBox Platform Version 2.6.3