isJSON

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

isJSON(value) → returns boolean

Argument Reference

value string
Required

A string or variable that represents one.

Links more information about isJSON

Examples
Sample code invoking the isJSON function

Returns true when the argument is a valid JSON value.

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

Expected Result: true

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub