An open API service indexing awesome lists of open source software.

https://github.com/makevoid/redijson

small library to use redis as JSON datastore for objects (serialized in json via Oj)
https://github.com/makevoid/redijson

db json lib library redis serializer

Last synced: 2 months ago
JSON representation

small library to use redis as JSON datastore for objects (serialized in json via Oj)

Awesome Lists containing this project

README

          

# RediJson

small library to use redis + arbitrary objects (serialized in json)

# API / Usage

strings

```rb
R[:foo] # nil
R[:foo] = "bar"
R[:foo] # bar
```

and more!

```rb
R[:foo] = ["f", "o", "o"]

R[:foo] # ["f", "o", "o"]
```

As you can see, it serializes and deserializes JSON arrays, and...

```rb
R[:foo] = { foo: "bar" }

R[:foo] # { foo: "bar" }
```

...objects

and the implementation is really few lines of code, because it's composing two simple things, redis and json together!