ISJSON#

Tests whether a string contains valid JSON.

Syntax#

ISJSON ( expression )

Arguments#

expression

The string to test.

Return value#

Returns 1 if the string contains valid JSON; otherwise, returns 0. Returns null if expression is null.

Does not return errors.

Examples#

The following example returns rows in which the column json_col contains valid JSON.

SELECT id, json_col
  FROM tab1
 WHERE ISJSON(json_col) = 1

See Also#