From 83290932c819def366168e4edf257e026a5ea648 Mon Sep 17 00:00:00 2001 From: TK Date: Tue, 31 Dec 2024 18:55:15 +0200 Subject: [PATCH] structured json save workflow --- py/save_image_plus.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/save_image_plus.py b/py/save_image_plus.py index ceaf656..3470d92 100644 --- a/py/save_image_plus.py +++ b/py/save_image_plus.py @@ -149,8 +149,8 @@ class SaveImagePlus: workflow = (extra_pnginfo or {}).get('workflow') if workflow is None: log('No workflow found, skipping saving of JSON') - with open(f'{json_file_name}', 'w') as workflow_file: - json.dump(workflow, workflow_file) + with open(f'{json_file_name}', 'w', encoding='utf-8') as workflow_file: + json.dump(workflow, workflow_file, ensure_ascii=False, indent=4) log(f'Saved workflow to {json_file_name}') except Exception as e: log(