Source: C:\KKT\soft\Scrypts\progressbot\core\utils\cash_sales\sales.py, lines 27-54 async def _get_json_from_zip(self, zip_path: Path) -> list[dict]: with zipfile.ZipFile(zip_path, "r") as zip_ref: for name in zip_ref.namelist(): if name.endswith(".json"): content = zip_ref.read(name).decode("utf-8") json_sections = content.split("---") result = [] for section in json_sections: section = section.strip() if not section: continue lines = [line.strip() for line in section.splitlines()] json_lines = [] for line in lines: if line.startswith("###"): continue json_lines.append(line) json_str = "\n".join(json_lines) if not json_str: continue result.append(json.loads(json_str)) return result