Create a json object from your table columns

Code
-- tested with MySQL 5.7, MariaDB 10.2, PostgreSQL 9.4

select JSON_OBJECT(
    "name", name,
    "date", date,
    "timestamp", timestamp,
    "status", status,
    "price", price
) as json_format from history limit 1;
Result
json_format
{"date": "2015-01-01 00:00:00.000000", "name": "foo", "price": 220.130140, "status": 5, "timestamp": 1420066800}


Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8