It’s possible to output query results as a JSON document when using the SQLite command line interface.
We can do this with the json output mode.
We can also use SQLite functions like json_object() and/or json_array() to return query results as a JSON document.