puts the basis to get the result of the query in JSon