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

deserializeJSON Argument Reference

jsonvar String

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

strictMapping boolean
Default: true

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

useCustomSerializer boolean
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