JSON functions were added in MariaDB 10.2.3.
 
Syntax
------ 
JSON_TYPE(json_val)
 
Description
----------- 
Returns the type of a JSON value, or NULL if the argument is
null.
 
An error will occur if the argument is an invalid JSON
value.
 
The following is a complete list of the possible return
types:
 
Return type | Value | 
 
ARRAY | JSON array | 
 
BIT | MariaDB BIT scalar | 
 
BLOB | MariaDB binary types (BINARY, VARBINARY or BLOB) | 
 
BOOLEAN | JSON true/false literals | 
 
DATE | MariaDB DATE scalar | 
 
DATETIME | MariaDB DATETIME or TIMESTAMP scalar | 
 
DECIMAL | MariaDB DECIMAL or NUMERIC scalar | 
 
DOUBLE | MariaDB DOUBLE FLOAT scalar | 
 
INTEGER | MariaDB integer types (TINYINT, SMALLINT,
MEDIUMINT, INT or BIGINT) | 
 
NULL | JSON null literal or NULL argument | 
 
OBJECT | JSON object | 
 
OPAQUE | Any valid JSON value that is not one of the other
types. | 
 
STRING | MariaDB character types (CHAR, VARCHAR, TEXT, ENUM
or SET) | 
 
TIME | MariaDB TIME scalar | 
 
Examples
-------- 
SELECT JSON_TYPE('{"A": 1, "B": 2, "C": 3}');
+---------------------------------------+
| JSON_TYPE('{"A": 1, "B": 2, "C": 3}') |
+---------------------------------------+
| OBJECT |
+---------------------------------------+
 

 
 
 
 
 
 
 

URL: https://mariadb.com/kb/en/json_type/