How to read data out of a SQLite database, into a dictionary before encoding it in JSON? How to read data out of a SQLite database, into a dictionary before encoding it in JSON? sqlite sqlite