Show More
@@ -28,7 +28,7 b' import json' | |||||
28 | class BytesEncoder(json.JSONEncoder): |
|
28 | class BytesEncoder(json.JSONEncoder): | |
29 | def default(self, obj): |
|
29 | def default(self, obj): | |
30 | if isinstance(obj, bytes): |
|
30 | if isinstance(obj, bytes): | |
31 |
return |
|
31 | return encodestring(obj).decode('ascii') | |
32 | return json.JSONEncoder.default(self, obj) |
|
32 | return json.JSONEncoder.default(self, obj) | |
33 |
|
33 | |||
34 |
|
34 |
General Comments 0
You need to be logged in to leave comments.
Login now