JSON functions were added in MariaDB 10.2.3.
JSON_OBJECT([key, value[, key, value] ...])
Returns a JSON object containing the given key/value pairs. The key/value list can be empty.
An error will occur if there are an odd number of arguments, or any key name is NULL.
SELECT JSON_OBJECT("id", 1, "name", "Monty"); +---------------------------------------+ | JSON_OBJECT("id", 1, "name", "Monty") | +---------------------------------------+ | {"id": 1, "name": "Monty"} | +---------------------------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/json_object/