feat: add support for 'UTF-8' for read json

pull/6/head
sean1832 1 year ago
parent 0fc126732c
commit 3a1be4367e

@ -116,7 +116,7 @@ def write_json(content, filepath, mode='w'):
def read_json(filepath):
try:
with open(filepath, 'r') as file:
with open(filepath, 'r', encoding='UTF-8') as file:
return json.load(file)
except FileNotFoundError:
create_json_not_exist(filepath)

Loading…
Cancel
Save