export_json#
- rojak.orchestrator.lite_controller.export_json(obj_to_dump, output_dir, start_time, type_adpater, fname_identifier, /, *, indent=4)[source]#
Serialise
obj_to_dumpto a timestamped JSON file underoutput_dir- Parameters:
obj_to_dump (T) – Object to serialise. Must match the type
type_adpaterwas built for.output_dir (Path) – Directory to write the JSON file into, created (along with any missing parents) if needed
start_time (str) – Timestamp identifying this run, included in the output filename
type_adpater (TypeAdapter) – Pydantic
TypeAdapterused to serialiseobj_to_dumpfname_identifier (str) – Prefix for the output filename, which is
f"{fname_identifier}_{start_time}.json"indent (int) – Indentation (in spaces) for the written JSON. Defaults to
4.
- Return type:
None