diff options
| author | 2025-03-15 14:49:39 +0800 | |
|---|---|---|
| committer | 2025-03-15 14:49:39 +0800 | |
| commit | 3b0cd85fd50ce159ce3bc219a9feb5d7b8650b0f (patch) | |
| tree | 0c79bcdeb6bf410244cbb0cd4627acf23f656307 /src | |
| parent | a60a0ab93434e8de0b6b402285f2cf6b8bc16817 (diff) | |
| download | conventional_role_play-3b0cd85fd50ce159ce3bc219a9feb5d7b8650b0f.tar.gz conventional_role_play-3b0cd85fd50ce159ce3bc219a9feb5d7b8650b0f.zip | |
fix: :bug: using f.read() instead of json.load()
Diffstat (limited to 'src')
| -rw-r--r-- | src/conventionalrp/core/parser.py | 4 |
1 files changed, 3 insertions, 1 deletions
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: |
