Skip to content

Commit b5c8a54

Browse files
authored
doc update (#4803)
1 parent 3ca040c commit b5c8a54

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/user/ppl/functions/json.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,32 @@ Example::
6262
| json scalar string | "abc" | "abc" |
6363
+--------------------+---------------------------------+---------------------------------+
6464

65+
JSON_VALID
66+
----------
67+
68+
Description
69+
>>>>>>>>>>>
70+
71+
Version: 3.1.0
72+
73+
Limitation: Only works when plugins.calcite.enabled=true
74+
75+
Usage: `json_valid(value)` Evaluates whether a string uses valid JSON syntax. Returns TRUE if valid, FALSE if invalid. NULL input returns NULL.
76+
77+
Argument type: STRING
78+
79+
Return type: BOOLEAN
80+
81+
Example::
82+
83+
os> source=people | eval is_valid_json = json_valid('[1,2,3,4]'), is_invalid_json = json_valid('{invalid}') | fields is_valid_json, is_invalid_json | head 1
84+
fetched rows / total rows = 1/1
85+
+---------------+-----------------+
86+
| is_valid_json | is_invalid_json |
87+
|---------------+-----------------|
88+
| True | False |
89+
+---------------+-----------------+
90+
6591
JSON_OBJECT
6692
----------
6793

0 commit comments

Comments
 (0)