Skip to content

Inconsistency in the decoding behavior when using client.json() #2931

Closed
@mpmX

Description

@mpmX

Version: 4.6.0

Platform: Ubuntu 20.04

Description: Currently, there is an inconsistency in the decoding behavior when using the json().get() method followed by the JSON.GET command.

>>> client.execute_command("JSON.GET", 'foobar')
'{"foo":"bar"}'
>>> client.json().get("foobar")
{'foo': 'bar'}
>>> client.execute_command("JSON.GET", 'foobar')
{'foo': 'bar'}

Expected Behavior: client.execute_command should have consistent decoding behavior when called on the same client

Maybe the problem is that the response callbacks are not cleaned up after the usage of .json().
https://github.com/redis/redis-py/blob/master/redis/commands/json/__init__.py#L77C1-L78C1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions