diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-11-02 11:55:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 11:55:07 +0200 |
commit | 75c5d5974ed3f6a5069f601f4c0d42ad3ae48c76 (patch) | |
tree | 0b2816f1b8e05ccae996931d7c1e99e004c403aa /redis/commands/json/decoders.py | |
parent | e46dd85aa9e30a27106baf04ce22cb3e986857bb (diff) | |
download | redis-py-75c5d5974ed3f6a5069f601f4c0d42ad3ae48c76.tar.gz |
Improved JSON accuracy (#1666)
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 |