Skip to content

Commit 395ffb6

Browse files
committed
Added Flask config for custom JSON encoder
1 parent 7ad7b1b commit 395ffb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/labthings/server/representations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def output_json(data, code, headers=None):
3535
"""Makes a Flask response with a JSON encoded body, using app JSON settings"""
3636

3737
settings = current_app.config.get("LABTHINGS_JSON", {})
38-
encoder = LabThingsJSONEncoder
38+
encoder = current_app.config.get("LABTHINGS_JSON_ENCODER", {}) or LabThingsJSONEncoder
3939

4040
if current_app.debug:
4141
settings.setdefault("indent", 4)

0 commit comments

Comments
 (0)