use json.dumps on query construct