MCPcopy Create free account
hub / github.com/codefuse-ai/codefuse-devops-eval / save_to_json_file

Function save_to_json_file

src/utils/json_utils.py:26–31  ·  view source on GitHub ↗
(data, filename, encoding="utf-8")

Source from the content-addressed store, hash-verified

24
25
26def save_to_json_file(data, filename, encoding="utf-8"):
27 dir_name = os.path.dirname(filename)
28 if not os.path.exists(dir_name): os.makedirs(dir_name)
29
30 with open(filename, "w", encoding=encoding) as f:
31 json.dump(data, f, indent=2, ensure_ascii=False)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected