Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 check

  • json_type_constraint - the JSON content type to check for; possible values:

    • VALUE

    • ARRAY

    • OBJECT

    • SCALAR

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 text

  • path - JSON path that specifies an object or an array to extract

  • newValue - 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.

To extract a scalar value from a JSON string (instead of an object or array), use the JSON_VALUE function.

Parameters

  • expression - the name of a variable or a column that contains JSON text

  • path - 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.

To extract an object or array (instead of the scalar value), see JSON_QUERY.

Parameters

  • expression - the name of a variable or a column that contains JSON text

  • path - 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?