diff options
Diffstat (limited to 'redis/commands/json/__init__.py')
-rw-r--r-- | redis/commands/json/__init__.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/redis/commands/json/__init__.py b/redis/commands/json/__init__.py index 1727383..6bc592f 100644 --- a/redis/commands/json/__init__.py +++ b/redis/commands/json/__init__.py @@ -1,14 +1,11 @@ from json import JSONDecoder, JSONEncoder from .decoders import ( - int_or_list, - int_or_none -) -from .helpers import bulk_of_jsons -from .decoders import ( decode_list_or_int, - decode_toggle + decode_toggle, + int_or_none, ) +from .helpers import bulk_of_jsons from ..helpers import nativestr, delist from .commands import JSONCommands @@ -51,15 +48,15 @@ class JSON(JSONCommands): "JSON.NUMINCRBY": self._decode, "JSON.NUMMULTBY": self._decode, "JSON.TOGGLE": decode_toggle, - "JSON.STRAPPEND": int, + "JSON.STRAPPEND": decode_list_or_int, "JSON.STRLEN": decode_list_or_int, - "JSON.ARRAPPEND": int, - "JSON.ARRINDEX": int, - "JSON.ARRINSERT": int, + "JSON.ARRAPPEND": decode_list_or_int, + "JSON.ARRINDEX": decode_list_or_int, + "JSON.ARRINSERT": decode_list_or_int, "JSON.ARRLEN": int_or_none, "JSON.ARRPOP": self._decode, - "JSON.ARRTRIM": int, - "JSON.OBJLEN": int, + "JSON.ARRTRIM": decode_list_or_int, + "JSON.OBJLEN": decode_list_or_int, "JSON.OBJKEYS": delist, # "JSON.RESP": delist, "JSON.DEBUG": decode_list_or_int, |