Implement object-to-string conversion in formatter