libgunshotmatch.gzip_util¶
Read and write gzipped JSON.
Functions:
|
Load JSON from a gzipped file. |
|
Write JSON to a gzip file. |
-
write_gzip_json(path, data, indent=2, mtime=0)[source]¶ Write JSON to a gzip file.
- Parameters
path (
Union[str,Path,PathLike]) – The filename to write to.data (
Union[str,int,float,bool,None,Dict[str,Any],List[Any],Tuple[Any, …],OrderedDict]) – The JSON-serializable data to output.indent (
Optional[int]) – Number of spaces used to indent JSON. Default2.mtime (
int) – Modification time for gzip header. Default0.
Changed in version 0.12.0: Added
mtimeargument.