export_graph_json
Kind: Function
Domain: Graph, serialization, and replay
Canonical import: from cadflow import export_graph_json
Signature
def export_graph_json(graph: 'OperationGraph', indent: 'int' = 2) -> 'str'
Description
Export an OperationGraph to a JSON string.
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
graph | 'OperationGraph' | yes | - | The graph to export. |
indent | 'int' | no | 2 | JSON indentation level. |
Returns
Type: 'str'
JSON string representation.
Errors
The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.
Behavior and constraints
- This operation writes an external artifact. Validate the returned path or output file before delivery.
- Serialized data is intended to remain JSON-safe and should be schema-validated when crossing trust boundaries.
Import check
from cadflow import export_graph_json