add JSON() method for queries for easy logging