Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (72 sloc) 2.33 KB


CFML supports native JSON support via several key functions and some member functions.

Core Functions

The core functions that deal with JSON are:

Function Description



[ , strictMapping ]

[ , useCustomSerializer ]


Converts a JSON (JavaScript Object Notation) string data representation into CFML data, such as a struct or array. Only the 'json' argument is required.
isJson( var ) Evaluates whether a string is in valid JSON (JavaScript Object Notation) data interchange format.



[ , serializeQueryByColumns ]

[ , useSecureJSONPrefix ]

[ , useCustomSerializer ]


Converts CFML data into a JSON (JavaScript Object Notation) representation of the data. Only the 'data' argument is required.
Here are some examples for you:
if( isJson( mydata ) ){
    return deserializeJSON( data );

serializeJSON( myQuery, true );
serializeJSON( myData );

person = deserializeJSON( '{"company":"Ortus","name":"Mr OrtusMan"}' );
writeOutput( );

Member Functions

You can call the deserializeJSON() from any string literal:

var deserializedData = myjsonString.deserializeJson();
var data = '[]'.deserializeJson();
You can’t perform that action at this time.