Convert data to a string