summaryrefslogtreecommitdiff
path: root/redis/commands/json/decoders.py
diff options
context:
space:
mode:
authorChayim I. Kirshen <c@kirshen.com>2021-11-01 17:52:32 +0200
committerChayim I. Kirshen <c@kirshen.com>2021-11-01 17:52:32 +0200
commit2bc2d6668661dcdd1c3ff5795f505a0e492f8bc2 (patch)
treec94fb691215ee0487b11c1e02f0512222c86518b /redis/commands/json/decoders.py
parent8178997e2838d01dafe14dcf0a1d2d6c6a20f051 (diff)
downloadredis-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/decoders.py')
-rw-r--r--redis/commands/json/decoders.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/redis/commands/json/decoders.py b/redis/commands/json/decoders.py
new file mode 100644
index 0000000..0ee102a
--- /dev/null
+++ b/redis/commands/json/decoders.py
@@ -0,0 +1,12 @@
+def int_or_list(b):
+ if isinstance(b, int):
+ return b
+ else:
+ return b
+
+
+def int_or_none(b):
+ if b is None:
+ return None
+ if isinstance(b, int):
+ return b