diff options
| author | 2025-03-15 17:54:05 +0800 | |
|---|---|---|
| committer | 2025-03-15 17:54:05 +0800 | |
| commit | 898db38f66f2b6b0047df75eaf3ced0d64cda664 (patch) | |
| tree | f2d06c916894c82364d5e572e83054d636657652 /src | |
| parent | 965771fb0d85ddb27dc6c5dd7df822d1fb318286 (diff) | |
| download | conventional_role_play-898db38f66f2b6b0047df75eaf3ced0d64cda664.tar.gz conventional_role_play-898db38f66f2b6b0047df75eaf3ced0d64cda664.zip | |
feat: ➕ Add dependency json5
Diffstat (limited to 'src')
| -rw-r--r-- | src/conventionalrp/core/parser.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conventionalrp/core/parser.py b/src/conventionalrp/core/parser.py index d5b91da..4d9b975 100644 --- a/src/conventionalrp/core/parser.py +++ b/src/conventionalrp/core/parser.py @@ -1,4 +1,4 @@ -import json +import json5 import re from pathlib import Path @@ -15,7 +15,7 @@ class Parser: with open(rules_path, "r", encoding="utf-8") as f: file_content = f.read() - rules = json.loads(file_content) + rules = json5.loads(file_content) # validation rule format if rules is None: @@ -54,4 +54,4 @@ class Parser: else: parsed_data.append({"content": line.strip(), "type": "unknown"}) - return parsed_data + return parsed_data
\ No newline at end of file |
