MariaDB JSON Functions

Below is a list of the JSON functions available in MariaDB.

NameDescription
JSON_ARRAY()Create JSON array
JSON_ARRAYAGG()Returns a JSON array containing an element for each value in a given set of JSON or SQL values.
JSON_ARRAY_APPEND()Append data to JSON document
JSON_ARRAY_INSERT()Insert into JSON array
JSON_COMPACT()Removes all unnecessary spaces from a JSON document, so that it’s as short and compact as possible, and returns the result.
JSON_CONTAINS()Whether JSON document contains specific object at path
JSON_CONTAINS_PATH()Whether JSON document contains any data at path
JSON_DEPTH()Maximum depth of JSON document
JSON_DETAILED()Print a JSON document in human-readable format
JSON_EXISTS()Determines whether a value exists at the specified path in the given JSON data.
JSON_EXTRACT()Return data from JSON document
JSON_INSERT()Insert data into JSON document
JSON_KEYS()Array of keys from JSON document
JSON_LENGTH()Number of elements in JSON document
JSON_LOOSE()Adds spaces to a JSON document to make it more readable for humans.
JSON_MERGE()Merge JSON documents, preserving duplicate keys. Deprecated.
JSON_MERGE_PATCH()Merge JSON documents, replacing values of duplicate keys
JSON_MERGE_PRESERVE()Merge JSON documents, preserving duplicate keys. Synonym for the deprecated JSON_MERGE().
JSON_OBJECT()Create JSON object
JSON_OBJECTAGG()Returns a JSON object containing key-value pairs, based on its two arguments.
JSON_QUERY()Returns an object or array from a JSON document, based on the path provided.
JSON_QUOTE()Quote JSON document
JSON_REMOVE()Remove data from JSON document
JSON_REPLACE()Replace values in JSON document
JSON_SEARCH()Path to value within JSON document
JSON_SET()Insert data into JSON document
JSON_TABLE()Return data from a JSON expression as a relational table
JSON_TYPE()Type of JSON value
JSON_UNQUOTE()Unquote JSON value
JSON_VALID()Whether JSON value is valid
JSON_VALUE()Extract value from JSON document at location pointed to by the path provided.