Implement pretty JSON string serialization.