In MariaDB, JSON_LOOSE() is a built-in function that adds spaces to a JSON document to make it more readable.
It’s similar to the JSON_DETAILED() function, except that it doesn’t emphasise nested structures in the way that JSON_DETAILED() does.
For the opposite effect (i.e. to remove unnecessary spaces), use the JSON_COMPACT() function.