Isjson()
Description
FUNCTION: isjson(<string>)
Returns 1 if the given string is valid JSON, and 0 otherwise.
Examples
> say isjson({“name”:“Bob”})
You say, “1”
> say isjson(not json)
You say, “0”
> say isjson([1,2,3])
You say, “1”
FUNCTION: isjson(<string>)
Returns 1 if the given string is valid JSON, and 0 otherwise.
> say isjson({“name”:“Bob”})
You say, “1”
> say isjson(not json)
You say, “0”
> say isjson([1,2,3])
You say, “1”