add query and json representation of the query result