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

Method write_json

codewiki/mcp/workspace.py:67–71  ·  view source on GitHub ↗

Write *data* as pretty-printed JSON and return the file path.

(self, name: str, data: Any)

Source from the content-addressed store, hash-verified

65 # -- writers ----------------------------------------------------------
66
67 def write_json(self, name: str, data: Any) -> Path:
68 """Write *data* as pretty-printed JSON and return the file path."""
69 p = self.root / name
70 p.write_text(json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8")
71 return p
72
73 def write_component_source(
74 self,

Callers 3

handle_analyze_repoFunction · 0.95
handle_save_module_treeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected