Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify codec for containers to encode/decode values #59

Closed
mathieulongtin opened this issue Nov 6, 2017 · 1 comment
Closed

Specify codec for containers to encode/decode values #59

mathieulongtin opened this issue Nov 6, 2017 · 1 comment

Comments

@mathieulongtin
Copy link

I had a need to store JSON encoded data in a Walrus Hash, so I hand coded a class to do that, but I was wondering if there would be more interest for something like this.

Example:

>>> hash = redisconnection.Hash(codec=json)
>>> hash["hello"] = dict(place="world", greeting="hey")
# Dict is stored as a JSON
>>> hash["hello"]
{"place": "world", "greeting": "hey"}
>>>

So my question:
Is there any interest for a PR that would implement that for all containers?

The codec would be any module or object that implements both loads and dumps function/method.

@coleifer
Copy link
Owner

coleifer commented Nov 6, 2017

Probably gonna pass on this for now, but thank you for your suggestion.

@coleifer coleifer closed this as completed Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants