MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / load_json

Method load_json

codewiki/src/utils.py:25–31  ·  view source on GitHub ↗

Load JSON from file, return None if file doesn't exist.

(filepath: str)

Source from the content-addressed store, hash-verified

23 json.dump(data, f, indent=4, ensure_ascii=False)
24
25 @staticmethod
26 def load_json(filepath: str) -> Optional[Dict[str, Any]]:
27 """Load JSON from file, return None if file doesn't exist."""
28 if not os.path.exists(filepath):
29 return None
30
31 with open(filepath, "r", encoding="utf-8") as f:
32 return json.load(f)
33
34 @staticmethod

Callers 10

load_cache_indexMethod · 0.80
load_job_statusesMethod · 0.80
load_module_treeFunction · 0.80
serve_generated_docsMethod · 0.80
run_module_agentMethod · 0.80
runMethod · 0.80

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected