diff --git a/freqtrade/configuration/environment_vars.py b/freqtrade/configuration/environment_vars.py index 5baa2bfc3..8a825f59b 100644 --- a/freqtrade/configuration/environment_vars.py +++ b/freqtrade/configuration/environment_vars.py @@ -1,8 +1,9 @@ -import json import logging import os from typing import Any +import rapidjson + from freqtrade.constants import ENV_VAR_PREFIX from freqtrade.misc import deep_merge_dicts @@ -23,8 +24,11 @@ def _get_var_typed(val): return False # try to convert from json try: - return json.loads(val) - except json.decoder.JSONDecodeError: + value = rapidjson.loads(val) + # Limited to lists for now + if isinstance(value, list): + return value + except rapidjson.JSONDecodeError: pass # keep as string return val