FFFF Support for Redis JSON · Issue #690 · brainix/pottery · GitHub
[go: up one dir, main page]

Skip to content

Support for Redis JSON #690

Open
Open

Description

@devleaks

Is your feature request related to a problem? Please describe.

There is room for a RedisJSON "proxy object" that would stay in sync with its Redis JSON value.

Describe the solution you'd like

>>> obj = RedisJSON({"a": 1}, redis=redis, key="json_document")
>>> obj["b"] = {"c": [2]}
>>> print(redis.json().get("json_document")
{"a": 1, "b": {"c": [2]}}
>>> redis.json().arrappend("json_document", Path("b.c"), 3)
>>> print(obj["b"]["c"])
[2, 3]

(May be we could even limit assignments to JSON/JavaScript-valid only types like string, int, float, boolean, null.)

Describe alternatives you've considered
RedisDict{}

Additional context
Not applicable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0