Converts a JSON (JavaScript Object Notation) string data representation into CFML data, such as a CFML structure or array.

deserializeJSON(jsonvar [, strictMapping, useCustomSerializer]) → returns Any

Argument Reference for the deserializeJSON function


Required: Yes
A string that contains a valid JSON construct, or variable that represents one.


Required: No
Default: true
A Boolean value that specifies whether to convert the JSON strictly. If true everything becomes structures.


Required: Yes
Default: true

Examples sample code invoking the deserializeJSON function

Convert JSON into CF Structure

person = deserializeJSON( '{"company":"Foundeo","name":"Pete Freitag"}' );
writeOutput( );

Expected Result: Foundeo

Fork me on GitHub