Issue #26623: TypeError message for JSON unserializible object now contains
object's type name, not object's representation.
Based on patch by Mahmoud Lababidi.
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index d596489..0772bbc 100644
--- a/Lib/json/encoder.py
+++ b/Lib/json/encoder.py
@@ -176,7 +176,8 @@
                 return JSONEncoder.default(self, o)
 
         """
-        raise TypeError(repr(o) + " is not JSON serializable")
+        raise TypeError("Object of type '%s' is not JSON serializable" %
+                        o.__class__.__name__)
 
     def encode(self, o):
         """Return a JSON string representation of a Python data structure.