It would probably be faster to retrieve JSON directly from the database rather than generate it in Python. http://www.postgresql.org/docs/9.3/static/functions-json.html Of course if its fast enough as it is then it might now be worth the trouble of implementing it.
It would probably be faster to retrieve JSON directly from the database rather than generate it in Python.
http://www.postgresql.org/docs/9.3/static/functions-json.html
Of course if its fast enough as it is then it might now be worth the trouble of implementing it.