fix json encoding of bytes

This commit is contained in:
Jack Robison 2018-08-16 15:55:33 -04:00
parent aa83bbd637
commit 4384a5f022
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -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):