JSON Functions
Reference of the SQL JSON functions supported by GridGain — IS_JSON, JSON_ARRAY, JSON_MODIFY, JSON_OBJECT, JSON_QUERY, and JSON_VALUE.
IS_JSON
Description
Checks if the string contains valid JSON content.
IS_JSON ( string [, json_type_constraint] )Parameters
string- the string to checkjson_type_constraint- the JSON content type to check for; possible values:VALUEARRAYOBJECTSCALAR
Example
Check 'years' for JSON objects:
JSON_ARRAY
Description
Creates a JSON array from the specified expressions.
Parameters
json_array_value - the value of an element in the JSON array
Example
Create a JSON array out of the elements: 'example', 1, and 4.2:
JSON_MODIFY
Description
Updates the value of a property and returns the updated JSON string.
Parameters
expression- the name of a variable or a column that contains JSON textpath- JSON path that specifies an object or an array to extractnewValue- the new value to assign to the specified property
Example
Change Bristol to London in the 'info' JSON string.
JSON_OBJECT
Description
Creates a JSON object based on the specified expression.
Parameters
json_key_value - an expression that defines the value of the JSON key: (key1, value1, key2, value2...)
Example
Create a JSON object:
JSON_QUERY
Description
Extracts an object or an array from a JSON string.
Parameters
expression- the name of a variable or a column that contains JSON textpath- JSON path that specifies the object or array to extract
Example
Extract the 'info' object:
JSON_VALUE
Description
Extracts a scalar value from a JSON string.
Parameters
expression- the name of a variable or a column that contains JSON textpath- JSON path that specifies the value to extract
Example
Extract the 'town' value from the 'info' JSON string.
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

