Disabled slash-escape for .json

This commit is contained in:
Profitroll 2023-03-12 22:14:41 +01:00
parent 6684c4d750
commit 8cc7808afb
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,11 @@ def jsonSave(contents: Any, filename: str) -> None:
"""Dumps dict/list arg1 to file arg2"""
try:
with open(filename, "w", encoding="utf8") as file:
file.write(dumps(contents, ensure_ascii=False, indent=4))
file.write(
dumps(
contents, ensure_ascii=False, indent=4, escape_forward_slashes=False
)
)
file.close()
except Exception as exp:
logWrite(f"Could not save json file {filename}: {exp}\n{print_exc()}")