12345678910111213141516171819 |
- import json
- def ReadJson(json_file_path, key):
- with open(json_file_path, 'r', encoding='UTF-8') as f:
- s = json.load(f)
- if not key in s:
- return None
- return s[key]
- def getJsonKeys(json_str):
- return json_str.keys()
- if __name__ == "__main__":
- # keystore = ReadJson("/Users/guweibing/921sdk/demo/config.json", "keystore")
- # print keystore
- pass
|