Add query to json output in json generation test