JSON Functions

MariaDB starting with 10.2.3

Functions relating to JSON, such as JSON_VALUE, JSON_ARRAY etc.

Title Description
Differences between JSON_QUERY and JSON_VALUE Comparison between and examples with JSON_QUERY and JSON_VALUE.
JSON_ARRAY Returns a JSON array containing the listed values.
JSON_ARRAYAGG Returns a JSON array containing an element for each value in a given set of JSON or SQL values.
JSON_ARRAY_APPEND Appends values to the end of the given arrays within a JSON document.
JSON_ARRAY_INSERT Inserts a value into a JSON document.
JSON_COMPACT Removes all unnecessary spaces so the json document is as short as possible.
JSON_CONTAINS Whether a value is found in a given JSON document or at a specified path within the document.
JSON_CONTAINS_PATH Indicates whether the given JSON document contains data at the specified path or paths.
JSON_DEPTH Maximum depth of a JSON document.
JSON_DETAILED Represents JSON in the most understandable way emphasizing nested structures.
JSON_EQUALS Checks if there is equality between two json objects.
JSON_EXISTS Determines whether a specified JSON value exists in the given data.
JSON_EXTRACT Extracts data from a JSON document.
JSON_INSERT Inserts data into a JSON document.
JSON_KEYS Returns keys from top-level value of a JSON object or top-level keys from the path.
JSON_LENGTH Returns the length of a JSON document, or the length of a value within the document.
JSON_LOOSE Adds spaces to a JSON document to make it look more readable.
JSON_MERGE Merges the given JSON documents.
JSON_MERGE_PATCH RFC 7396-compliant merge of the given JSON documents.
JSON_MERGE_PRESERVE Synonym for JSON_MERGE.
JSON_NORMALIZE Recursively sorts keys and removes spaces, allowing comparison of json documents for equality.
JSON_OBJECT Returns a JSON object containing the given key/value pairs.
JSON_OBJECTAGG Returns a JSON object containing key-value pairs.
JSON_QUERY Given a JSON document, returns an object or array specified by the path.
JSON_QUOTE Quotes a string as a JSON value.
JSON_REMOVE Removes data from a JSON document.
JSON_REPLACE Replaces existing values in a JSON document.
JSON_SEARCH Returns the path to the given string within a JSON document.
JSON_SET Updates or inserts data into a JSON document.
JSON_TABLE Given data from a JSON document, returns a representation of it as a relational table.
JSON_TYPE Returns the type of a JSON value.
JSON_UNQUOTE Unquotes a JSON value, returning a string.
JSON_VALID Whether a value is a valid JSON document or not.
JSON_VALUE Given a JSON document, returns the specified scalar.
JSONPath Expressions MariaDB JSONPath description and definition.
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/json-functions/