Skip to content

Commit 4d81372

Browse files
authored
Add support for serialization of type bytearray (#268)
1 parent e2ae192 commit 4d81372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

knack/output.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _decode_str(output):
2525
class _ComplexEncoder(json.JSONEncoder):
2626

2727
def default(self, o): # pylint: disable=method-hidden
28-
if isinstance(o, bytes) and not isinstance(o, str):
28+
if isinstance(o, (bytes, bytearray)):
2929
return o.decode()
3030
return json.JSONEncoder.default(self, o)
3131

0 commit comments

Comments
 (0)