mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-15 08:46:56 +08:00
second commit
This commit is contained in:
9
qlib/finco/utils.py
Normal file
9
qlib/finco/utils.py
Normal file
@@ -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.")
|
||||||
Reference in New Issue
Block a user