MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _emit_json

Function _emit_json

analysis/cli.py:208–214  ·  view source on GitHub ↗
(payload: Any, output: str | Path | None)

Source from the content-addressed store, hash-verified

206
207
208def _emit_json(payload: Any, output: str | Path | None) -> int:
209 rendered = json.dumps(payload, ensure_ascii=False, indent=2)
210 if output:
211 Path(output).write_text(rendered + "\n", encoding="utf-8")
212 else:
213 print(rendered)
214 return 0
215
216
217def _write_csv(path: Path, rows: list[dict[str, Any]]) -> None:

Callers 1

handle_analysis_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected