string.deserializeJSON()

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

string.deserializeJSON( strictMapping=boolean )

Returns: any

Argument Description
strictMapping
boolean, optional

A Boolean value that specifies how to convert the JSON

  • TRUE Converts JSON structure strictly to CFML, using only JSON Datatypes
  • FALSE Query formats (like SerializeJSON outputs) are converted back to CFML Queries

Examples

world = '{"save":"water","clean":"wastes"}';
res1 = deserializeJson(world);
writeDump(res1);
writeDump(res1.save);
writeDump(isstruct(res1));

See also