TinyMUX

Isjson()

Functions

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”

json(), json_query(), json_mod()