I want to support three variants for the rows output:
- a list of lists, with a columns key saying what they are
- a list of dictionaries
- a single dictionary where the keys are the primary keys of the rows and the values are the row dictionaries themselves
I also want to make the various bits of metadata opt-in - so you don't get the SQL statement unless you ask for it.
These output options should be controlled by query string arguments.
I will set the .jsono URL to redirect to .json with the corresponding options.