Free Motion Capture for Everyone πβ¨
TypeScript
improve save_dictionary_to_json to pathlib native syntax (#432)
newturok476f5c62d326
diff --git a/freemocap/utilities/save_dictionary_to_json.py b/freemocap/utilities/save_dictionary_to_json.pyindex ad146326..397d91a2 100644--- a/freemocap/utilities/save_dictionary_to_json.py+++ b/freemocap/utilities/save_dictionary_to_json.py@@ -11,8 +11,6 @@ def save_dictionary_to_json(save_path: Union[Path, str], dictionary: dict, file_file_name = f"{file_name}.json"json_file_path = Path(save_path) / file_name-- with open(json_file_path, "w") as file:- json.dump(dictionary, file, indent=4)+ json_file_path.write_text(json.dumps(dictionary, indent=4))logger.info(f"Saved dictionary {file_name} as json at: {json_file_path}")