Encode true and false to 1 and 0 for query parameters