(path: FilePath, data: JSONInput, indent: int = 2)
Create a .json.gz file and dump contents.

    path (FilePath): The file path.
    data (JSONInput): The JSON-serializable data to output.
    indent (int): Number of spaces used to indent JSON.
Create a .json.gz file and dump contents.
Create a . json . gz file and dump contents .
def write_gzip_json(path: FilePath, data: JSONInput, indent: int = 2) -> None:
    """Create a .json.gz file and dump contents.

    path (FilePath): The file path.
    data (JSONInput): The JSON-serializable data to output.
    indent (int): Number of spaces used to indent JSON.
    """
    json_data = json_dumps(data, indent=indent)
    file_path = force_string(path)
    with gzip.open(file_path, "w") as f:
        f.write(json_data.encode("utf-8"))
def write_gzip_json ( path : FilePath , data : JSONInput , indent : int = 2 ) -> None : json_data = json_dumps ( data , indent = indent ) file_path = force_string ( path ) with gzip . open ( file_path , "w" ) as f : f . write ( json_data . encode ( "utf-8" ) )