JSON Functions

The JSON functions operate on JSON data structures and objects.

FunctionReturn TypeInput ArgumentsDescription
is_json_scalar({json})Boolean
  • json: JSON
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
  • array: JSON array
  • value: Any data type
Returns true if array contains value, otherwise false.
json_array_length({array})Bigint
  • array: JSON array
Returns the length of the input array.
json_extract({json}, {path})JSON string
  • json: JSON
  • path: JSON Path
Evaluates the JSON Path of the input, and returns the result as a JSON string.
json_format({json})Varchar
  • json: JSON
Returns the JSON text serialized from the input JSON value.
json_parse({string})JSON
  • string: String
Returns the JSON value deserialized from the input JSON text.
json_size({json})Bigint
  • json: JSON
Returns the size of the JSON objects or arrays. If the input is a scalar, the function returns zero.