RESP
is a wrapper around the Redis Serialization
Protocol. You can create all types—though
creating arrays is a little unsightly due to the absence of recursive types—,
stringify the built types into strings using str
, and decoding from
the string protocol using from-string
.
If you want your types to be supported when encoding, you’ll have to implement
the interface to-redis
, the signature of which is (Fn [a] RESP))
.
from-string
defn
(Fn [(Ref String a)] (Result RESP String))
(from-string s)
converts a RESP string into a RESP
data structure.