Adding ability to do generic json dump of query results