How to use jsonify on a query response?
<p>Using flask-restful, and having a database which stores, related to places, the name, hour of visit, hour of exit, and date of visit, I have this query:</p>

<pre><code>query = conn.execute("select * from geo_example where     init_hour='%d'"%hour_of_visit)
</code></pre>

<p>How do I use the jsonify function instead of doing it manually like this:</p>

<pre><code>result = {'inital_hour': [dict(zip(tuple (query.keys()) ,i)) for i in     query.cursor]}
</code></pre>