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.
2 parents 0c84187 + 32fa5e8 commit f4cde00Copy full SHA for f4cde00
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