JSON Functions
The JSON functions operate on JSON data structures and objects.
Function | Return Type | Input Arguments | Description |
---|---|---|---|
is_json_scalar({json}) | Boolean |
| Use this function to determine whether the input is a JSON scalar or not. A JSON scalar can be a JSON number, a JSON string, true, false, or null. |
json_array_contains({array}, {value}) | Boolean |
| Returns true if array contains value, otherwise false. |
json_array_length({array}) | Bigint |
| Returns the length of the input array. |
json_extract({json}, {path}) | JSON string |
| Evaluates the JSON Path of the input, and returns the result as a JSON string. |
json_format({json}) | Varchar |
| Returns the JSON text serialized from the input JSON value. |
json_parse({string}) | JSON |
| Returns the JSON value deserialized from the input JSON text. |
json_size({json}) | Bigint |
| Returns the size of the JSON objects or arrays. If the input is a scalar, the function returns zero. |