diff options
Diffstat (limited to 'Lib/json')
| -rw-r--r-- | Lib/json/encoder.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py index 0772bbc06b..d596489f42 100644 --- a/Lib/json/encoder.py +++ b/Lib/json/encoder.py @@ -176,8 +176,7 @@ class JSONEncoder(object): return JSONEncoder.default(self, o) """ - raise TypeError("Object of type '%s' is not JSON serializable" % - o.__class__.__name__) + raise TypeError(repr(o) + " is not JSON serializable") def encode(self, o): """Return a JSON string representation of a Python data structure. |
