MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / write_json

Function write_json

packages/protocol/scripts/lib/openapi_compat_lib.py:280–284  ·  view source on GitHub ↗
(path: pathlib.Path, payload: typing.Any)

Source from the content-addressed store, hash-verified

278
279
280def write_json(path: pathlib.Path, payload: typing.Any) -> None:
281 path.parent.mkdir(parents=True, exist_ok=True)
282 with open(path, "w", encoding="utf-8") as handle:
283 json.dump(payload, handle, indent=2, sort_keys=True)
284 handle.write("\n")
285
286
287def read_json(path: pathlib.Path) -> typing.Any:

Callers

nothing calls this directly

Calls 1

dumpMethod · 0.45

Tested by

no test coverage detected