JSON Functions

TDV supports the JSON functions listed in the table.

TDV-Supported JSON Function

Comments

DECODE_JSON

See DECODE_JSON

ENCODE_SIZE

See ENCODED_SIZE

ENCODE_JSON

See ENCODE_JSON

JSONPATH

The JSON)PATH function provides XPath-like syntax for JSON structures. It provides a way to extract parts of a given document.

JSON_ARRAY

Returns the listed values. The list can be empty. Array values must be of type string, number, object, array, boolean or null.

JSON_AVG

Returns the average value of a JSON array within a JSON object

JSON_COUNT

Returns the number of elements in a JSON array within a JSON object. It returns the values based on the JSON path passed as the second argument to the function.

JSON_EXTRACT

The JSON_EXTRACT function can extract individual values from a JSON object

JSON_EXTRACT_SCALAR

See JSON_EXTRACT_SCALAR

JSON_MAX

Returns the highest numeric value of a JSON array within a JSON object

JSON_MIN

Returns the lowest numeric value of a JSON array within a JSON object

JSON_OBJECT

Evaluates a key-value pair and returns a JSON object containing the pair

JSON_SUM

Returns the sum of the numeric values of a JSON array within a JSON object

JSON_TABLE

JSON_TABLE is a SQL extension that creates a relational view of JSON data.