Lucee Function Reference
deserializejson()
Converts a JSON (JavaScript Object Notation) or JSON5 string data representation into CFML data, such as a struct or array.
Example
deserializejson(string JSONVar,[boolean strictMapping,[string format]]):any
Category
string,parsing,json,javascript,json5
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
| Name | Type | Required | Default Value | Description |
|---|---|---|---|---|
| JSONVar | string | Yes | A string that contains a valid JSON or JSON5 construct, or a variable that represents one. | |
| strictMapping | boolean | No | true | A Boolean value that specifies whether to convert the JSON strictly. When true, the function will adhere to strict JSON mapping rules. |
| format | string | No | json5 |
The format of the input string. Possible values are: |