mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
9 lines
225 B
Python
9 lines
225 B
Python
import json
|
|
|
|
from decimal import Decimal
|
|
|
|
class DecimalEncoder(json.JSONEncoder):
|
|
def default(self, obj):
|
|
if isinstance(obj, Decimal):
|
|
return str(obj)
|
|
return json.JSONEncoder.default(self, obj) |