JSON_COMPACT()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
A description for this Function has not yet been added to this Documentation.
EXAMPLES
SET @json = ' {
"c" : 123.456 ,
"b" : 1,
"a": 42
} ';
SELECT JSON_COMPACT(@json);
+----------------------------+
| JSON_COMPACT(@json) |
+----------------------------+
| {"c":123.456,"b":1,"a":42} |
+----------------------------+
CREATE TABLE json_compact_example (
j1 JSON,
j2 JSON
);
INSERT INTO json_compact_example VALUES (' [ 1 , 2 ,3 ] ', ' { "a" : "A" }');
SELECT JSON_COMPACT(j1), JSON_COMPACT(j2)
FROM json_compact_example;
+------------------+------------------+
| JSON_COMPACT(j1) | JSON_COMPACT(j2) |
+------------------+------------------+
| [1,2,3] | {"a":"A"} |
+------------------+------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.