+
+
+def get_save_data():
+ savefile = get_save_file_name()
+ with open(savefile, 'rb') as f:
+ data = json.load(f)
+ return data
+
+
+def write_save_file(json_data):
+ save_dir = save_location()
+ if not os.path.exists(save_dir):
+ os.makedirs(save_dir)
+ savefile = get_save_file_name()
+ with open(savefile, 'wb') as f:
+ json.dump(json_data, f, indent=3)