We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b44bc08 commit 32fa5e8Copy full SHA for 32fa5e8
flask_rest_jsonapi/utils.py
@@ -3,6 +3,7 @@
3
import json
4
from uuid import UUID
5
from datetime import datetime
6
+from decimal import Decimal
7
8
9
class JSONEncoder(json.JSONEncoder):
@@ -11,4 +12,6 @@ def default(self, obj):
11
12
return obj.isoformat()
13
elif isinstance(obj, UUID):
14
return str(obj)
15
+ elif isinstance(obj, Decimal):
16
+ return str(obj)
17
return json.JSONEncoder.default(self, obj)
0 commit comments