write#
- lsst.images.json.write(obj: Any, path: str | ParseResult | ResourcePath | Path | None = None, metadata: dict[str, MetadataValue] | None = None, butler_info: ButlerInfo | None = None) ArchiveTree#
Write an object with a
serializemethod to a JSON file.Parameters#
- path
Name of the file to write to (may be a URI). If not provided, a serializable model is returned but not written to disk.
- metadata
Additional metadata to save with the object. This will override any flexible metadata carried by the object itself with the same keys.
- butler_info
Butler information to store in the file.
Returns#
serialization.ArchiveTreeThe serialized representation of the object.