Lucee Function Reference

serializejson()

Converts CFML data into a JSON (JavaScript Object Notation) representation of the data.

Example

serializejson(any var,[any queryFormat,[any useSecureJSONPrefixOrCharset,[boolean compact]]]):string

Category

string,formatting,json,javascript

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
var any  Yes   A CFML data value or variable that represents one.  
queryFormat any  No   Either a Boolean value that specifies whether to serialize CFML queries by Column, or a string with the value "struct".  
useSecureJSONPrefixOrCharset any  No   string characters that cannot be encoded by this charset get escaped,
if not set the web charset is used.  
compact boolean  No No If true, it does not use end-of-lines and indentation. Defaults to true.