polars.LazyFrame.write_json

LazyFrame.write_json(file: Optional[Union[io.IOBase, str, pathlib.Path]] = None, *, to_string: Literal[True]) str
LazyFrame.write_json(file: Optional[Union[io.IOBase, str, pathlib.Path]] = None, *, to_string: Literal[False] = False) None
LazyFrame.write_json(file: Optional[Union[io.IOBase, str, pathlib.Path]] = None, *, to_string: bool = False) Optional[str]

Serialize LogicalPlan to JSON representation.

Parameters
file

Write to this file instead of returning a string.

to_string

Ignore file argument and return a string.