Vedis Users Forum

Escaping quoted data?

append delete Charlie

Suppose I am using the hash data type and wish to store the following key/value pairs:

k "1" => v "1"
k "2" => v "2"

Would I write the following?

HMSET "my_hash" "k \"1\"" "v \"1\"" "k \"2\"" "v \"2\""

It seems that Vedis correctly interprets the escapes, but when it returns the data, it does not automatically unescape things.

I guess I'm wondering if there is a particular "right way" to do this?

Reply RSS


append delete #1. chm

Yes, Vedis automatically escape the string for you, but it's up to the client code to decode the escaped string.


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.