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/decoders.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/decoders.py')
-rw-r--r-- | redis/commands/json/decoders.py | 12 |
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 |