Skip to content

Plan serialization

JSON serialization and file I/O for portable execution plans.

export_json

export_json(plan: ExecutionPlan, path: str | Path) -> pathlib.Path

Serialize a plan to a JSON file.

from_json

from_json(path: str | Path) -> models.ExecutionPlan

Deserialize a plan from a JSON file.

from_dict

from_dict(payload: dict[str, Any]) -> models.ExecutionPlan

Load a plan from a decoded JSON object.

to_dict

to_dict(plan: ExecutionPlan) -> dict[str, typing.Any]

Return a plan as JSON-compatible data.