Unfortunately, MySQL doesn't offer a function like
SELECT JSON_OBJECT(*) FROM table
Now I'm wondering if anybody has already written a function that perform this task. What I want to achieve is to make aSELECT * statement from any given table that returns a JSON_OBJECT.
Of corse it would be possible to create this manually for each given table. But I'm looking for a more generic approach, where I don't need to specify all columns manually.