check_json¶
Description¶
Check that the argument value is a valid JSON document.
Return type¶
string
Domain¶
This is a scalar function (calculates a single output value for a single input row.)
Categories¶
Usage¶
check_json(value)
| Argument | Type | Optional | Repeatable | Restrictions | 
|---|---|---|---|---|
| value | string | no | no | none | 
Examples¶
make_col c:check_json(string(payload))
Make a new column, of type string, which is "" if payload is valid JSON or contains a reason that it could not be parsed.
make_col check: check_json('{"k1": "v1", "k1": "v2"}')
Make a new column containing the results of check_json on the specified string. In this case, the check column will contain the message duplicate object attribute "k1", pos 17.