From 3b0cd85fd50ce159ce3bc219a9feb5d7b8650b0f Mon Sep 17 00:00:00 2001 From: pine Date: Sat, 15 Mar 2025 14:49:39 +0800 Subject: fix: :bug: using f.read() instead of json.load() --- src/conventionalrp/core/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conventionalrp/core/parser.py b/src/conventionalrp/core/parser.py index 73f349f..266506b 100644 --- a/src/conventionalrp/core/parser.py +++ b/src/conventionalrp/core/parser.py @@ -12,7 +12,9 @@ class Parser: raise FileNotFoundError(f"No such file or directory: {rules_path} ") with open(rules_path, "r", encoding="utf-8") as f: - rules = json.load(f) + file_content = f.read() + + rules = json.loads(file_content) # validation rule format if rules is None: -- cgit v1.2.3-70-g09d2