Format cleaning for R6 API output.