Disabled slash-escape for .json

This commit is contained in:
Profitroll 2023-03-12 22:14:41 +01:00
parent 6684c4d750
commit 8cc7808afb

View File

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