The json_serial function needs to be provided in order to dump decimal.Decimal values correctly. (#280)
This commit is contained in:
committed by
Tom Kralidis
parent
7b8dc69865
commit
c8d0f1b512
+1
-1
@@ -997,7 +997,7 @@ def to_json(dict_):
|
||||
:returns: JSON string representation
|
||||
"""
|
||||
|
||||
return json.dumps(dict_)
|
||||
return json.dumps(dict_, default=json_serial)
|
||||
|
||||
|
||||
def _render_j2_template(config, template, data):
|
||||
|
||||
Reference in New Issue
Block a user