write_pydantic_json

write_pydantic_json(model: pydantic.BaseModel, path: str | Path | TextIO, *, exclude: set[str] | None = None, exclude_none: bool = True, exclude_unset: bool = True, exclude_defaults: bool = True, encoding: str | None = None, newline: str | None = None, ensure_ascii: bool = False, indent: int | None = None, trailing_newline: bool = True) None[source]

Write a model to a JSON file.