MCPcopy Index your code
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
24 @staticmethod
25 def load_json(filepath: str) -> Optional[Dict[str, Any]]:
26 """Load JSON from file, return None if file doesn't exist."""
27 if not os.path.exists(filepath):
28 return None
29
30 with open(filepath, 'r', encoding='utf-8') as f:
31 return json.load(f)
32
33 @staticmethod
34 def save_text(content: str, filepath: str) -> None:

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