diff --git a/qlib/finco/utils.py b/qlib/finco/utils.py new file mode 100644 index 000000000..1437ccb80 --- /dev/null +++ b/qlib/finco/utils.py @@ -0,0 +1,9 @@ +import json + +def parse_json(response): + try: + return json.loads(response) + except json.decoder.JSONDecodeError: + pass + + raise Exception(f"Failed to parse response: {response}, please report it or help us to fix it.") \ No newline at end of file