RedisdValue v; v = "abc"; assert(encode(v) == "+abc\r\n".representation); v = -1234567890; assert(encode(v) == ":-1234567890\r\n".representation); v = -0; assert(encode(v) == ":0\r\n".representation); v = -1234567890; assert(v.encode.decode.value == v); v = redisdValue("abc"); assert(v.encode.decode.value == v); v = redisdValue([1,2]); assert(v.encode.decode.value == v); v = redisdValue(tuple("abc", 1)); assert(v.encode.decode.value == v);
serialize RedisdValue to byte array