diff --git a/pyaccuwage/__init__.py b/pyaccuwage/__init__.py index 2de4c7b..a6775be 100644 --- a/pyaccuwage/__init__.py +++ b/pyaccuwage/__init__.py @@ -101,6 +101,9 @@ def json_dumps(records): if hasattr(o, 'toJSON') and isinstance(getattr(o, 'toJSON'), collections.Callable): return o.toJSON() + if type(o) is bytes: + return o.decode('ascii') + elif isinstance(o, decimal.Decimal): return str(o.quantize(decimal.Decimal('0.01')))