User Tools

Site Tools


syntax:functions:isjson

IsJson(text)

Returns TRUE if the argument can be parsed as a JSON object or JSON array. Otherwise returns FALSE.

Example Result
isjson("{}") TRUE
isjson("JSON") FALSE
isjson("a:{b:1}") FALSE
isjson("{a:{b:1}}") TRUE
isjson('1,"a"') FALSE
isjson('[1,"a"]') TRUE

See also

syntax/functions/isjson.txt · Last modified: 2020/11/25 17:56 by dmitry