From 816103870b646dd834779b8618e337ee68ddade2 Mon Sep 17 00:00:00 2001 From: daijro Date: Wed, 27 Nov 2024 23:09:25 -0600 Subject: [PATCH] jsonvv: Allow underscore in reference names 0.2.2 --- jsonvv/README.md | 10 ---------- jsonvv/jsonvv/parser.py | 2 +- jsonvv/pyproject.toml | 4 ++-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/jsonvv/README.md b/jsonvv/README.md index 042b573..b11a14c 100644 --- a/jsonvv/README.md +++ b/jsonvv/README.md @@ -189,16 +189,6 @@ This will require both `value` is set if and only if `isEnabled` is set. Multiple `$` can be used to create more complex group dependencies. -```python -keyOne$group1: "any" -keyTwo$group2: "any" -keyThree$group1$group2: "any" -``` - -If `keyThree` is set, both `keyOne` and `keyTwo` must also be set. - -However, if `keyOne` is set, `keyThree` needs to be set but `keyTwo` does not. - --- ## Supported Types diff --git a/jsonvv/jsonvv/parser.py b/jsonvv/jsonvv/parser.py index a862bdd..5b95ddc 100644 --- a/jsonvv/jsonvv/parser.py +++ b/jsonvv/jsonvv/parser.py @@ -187,7 +187,7 @@ class Parser: # Only consume alphanumeric and underscore characters while self.pos < self.length and ( - self.type_str[self.pos].isalnum() or self.type_str[self.pos] in '!@' + self.type_str[self.pos].isalnum() or self.type_str[self.pos] in '_.@!' ): self.pos += 1 diff --git a/jsonvv/pyproject.toml b/jsonvv/pyproject.toml index 380cdb1..7806339 100644 --- a/jsonvv/pyproject.toml +++ b/jsonvv/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "jsonvv" -version = "0.2.1" +version = "0.2.2" description = "JSON value validator" authors = ["daijro "] license = "MIT" @@ -19,7 +19,7 @@ keywords = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" [tool.poetry.scripts] jsonvv = "jsonvv.__main__:main"