We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb22ab8 commit 9bffd35Copy full SHA for 9bffd35
rest_framework/utils/encoders.py
@@ -51,6 +51,9 @@ def default(self, obj):
51
return six.text_type(obj)
52
elif isinstance(obj, QuerySet):
53
return tuple(obj)
54
+ elif isinstance(obj, six.binary_type):
55
+ # Best-effort for binary blobs. See #4187.
56
+ return obj.decode('utf-8')
57
elif hasattr(obj, 'tolist'):
58
# Numpy arrays and array scalars.
59
return obj.tolist()
0 commit comments