I would like my MySql query to return a JSON object that looks as follows:
{\"name\": \"Piotr\", \"likesMysql\": true}
This seems to be wor
This seems to be a bug in MySql.
You can workaround it though with cast(true as json) e.g.:
cast(true as json)
SELECT json_object( 'name', 'Piotr', 'likesMysql', if(4 MOD 2 = 0, cast(TRUE as json), cast(FALSE as json)) )