diff options
author | Chayim I. Kirshen <c@kirshen.com> | 2021-11-01 17:52:32 +0200 |
---|---|---|
committer | Chayim I. Kirshen <c@kirshen.com> | 2021-11-01 17:52:32 +0200 |
commit | 2bc2d6668661dcdd1c3ff5795f505a0e492f8bc2 (patch) | |
tree | c94fb691215ee0487b11c1e02f0512222c86518b /redis/commands/json/__init__.py | |
parent | 8178997e2838d01dafe14dcf0a1d2d6c6a20f051 (diff) | |
download | redis-py-ck-fixjson.tar.gz |
Improvements to JSON coverageck-fixjson
tests to validate json behaviour
deprecation support
api changes
Diffstat (limited to 'redis/commands/json/__init__.py')
-rw-r--r-- | redis/commands/json/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/redis/commands/json/__init__.py b/redis/commands/json/__init__.py index 9783705..3149bb8 100644 --- a/redis/commands/json/__init__.py +++ b/redis/commands/json/__init__.py @@ -1,5 +1,9 @@ from json import JSONDecoder, JSONEncoder +from .decoders import ( + int_or_list, + int_or_none +) from .helpers import bulk_of_jsons from ..helpers import nativestr, delist from .commands import JSONCommands @@ -48,13 +52,13 @@ class JSON(JSONCommands): "JSON.ARRAPPEND": int, "JSON.ARRINDEX": int, "JSON.ARRINSERT": int, - "JSON.ARRLEN": int, + "JSON.ARRLEN": int_or_none, "JSON.ARRPOP": self._decode, "JSON.ARRTRIM": int, "JSON.OBJLEN": int, "JSON.OBJKEYS": delist, # "JSON.RESP": delist, - "JSON.DEBUG": int, + "JSON.DEBUG": int_or_list, } self.client = client |