Explore JSON_DETAILED in MariaDB. Also known as JSON_PRETTY, this function formats JSON documents with indentation and newlines to emphasize nested structures for readability.
JSON_DETAILED(json_doc[, tab_size])
JSON_PRETTY(json_doc[, tab_size])SET @j = '{ "A":1,"B":[2,3]}';
SELECT @j;
+--------------------+
| @j |
+--------------------+
| { "A":1,"B":[2,3]} |
+--------------------+
SELECT JSON_DETAILED(@j);
+------------------------------------------------------------+
| JSON_DETAILED(@j) |
+------------------------------------------------------------+
| {
"A": 1,
"B":
[
2,
3
]
} |
+------------------------------------------------------------+