forked from LBRYCommunity/lbry-sdk
fix json encoding of bytes
This commit is contained in:
parent
aa83bbd637
commit
4384a5f022
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ class JSONResponseEncoder(JSONEncoder):
|
|||
return obj.strftime("%Y%m%dT%H:%M:%S")
|
||||
if isinstance(obj, Decimal):
|
||||
return float(obj)
|
||||
if isinstance(obj, bytes):
|
||||
return obj.decode()
|
||||
return super().default(obj)
|
||||
|
||||
def encode_transaction(self, tx):
|
||||
|
|
Loading…
Reference in a new issue