write#
- lsst.images.json.write(obj, path=None, metadata=None, butler_info=None)#
Write an object with a
serializemethod to a JSON file.- Parameters:
obj (
Any) – Object with aserializemethod to write.path (
str|ParseResult|ResourcePath|Path|None, default:None) – 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 (
dict[str,TypeAliasType] |None, default:None) – Additional metadata to save with the object. This will override any flexible metadata carried by the object itself with the same keys.butler_info (
ButlerInfo|None, default:None) – Butler information to store in the file.
- Returns:
The serialized representation of the object.
- Return type: