20 lines
325 B
Python
20 lines
325 B
Python
import json
|
|
import os
|
|
|
|
import spotframework.log.log as log
|
|
|
|
def loadJson(path):
|
|
|
|
log.log("load json", path)
|
|
|
|
if os.path.exists(path):
|
|
with open(path, 'r') as fileobj:
|
|
|
|
data = json.load(fileobj)
|
|
return data
|
|
|
|
else:
|
|
log.log("load json", "file doesn't exist")
|
|
|
|
return None
|