MCPcopy Create free account
hub / github.com/0xMarcio/cve / save_json

Function save_json

scripts/utils.py:37–40  ·  view source on GitHub ↗
(path: Path, data, *, sort_keys: bool = True)

Source from the content-addressed store, hash-verified

35
36
37def save_json(path: Path, data, *, sort_keys: bool = True) -> None:
38 path.parent.mkdir(parents=True, exist_ok=True)
39 with path.open("w", encoding="utf-8") as handle:
40 json.dump(data, handle, ensure_ascii=False, indent=2, sort_keys=sort_keys)
41
42
43def fetch_json(url: str, *, timeout: int = 30, headers: Optional[Dict[str, str]] = None):

Callers 10

mainFunction · 0.90
write_cve_outputsFunction · 0.90
write_indexFunction · 0.90
write_topFunction · 0.90
write_snapshotFunction · 0.90
write_diffFunction · 0.90
mainFunction · 0.90
persist_evidenceFunction · 0.90
write_api_outputsFunction · 0.90
build_diffFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected