cfdocs

isJSON

Evaluates whether a string is in valid JSON (JavaScript Object Notation) data interchange format.

isJSON(value)
returns boolean

Argument Reference

Name Type Required Default Description
value string Yes   A string or variable that represents one.

isJSON Example

Returns true when the argument is a valid JSON value.

isJSON("[1,2,3]")

Expected Result: YES