docs/RESP.md
RESP, which stands for Redis SErialization Protocol, is the protocol used by Redis to communicate with clients. This document shows how RESP types can be mapped to JavaScript types. You can learn more about RESP itself in the offical documentation.
By default, each type is mapped to the first option in the lists below. To change this, configure a typeMapping.
:) => number+) => string | Buffer$) => string | Buffer-) => ErrorReply*) => ArrayNOTE: the first type is the default type
_) => null#) => boolean:) => number | string() => BigInt | string,) => number | string+) => string | Buffer$) => string | Buffer=) => string | Buffer | VerbatimString-) => ErrorReply!) => ErrorReply*) => Array~) => Array | Set%) => object | Map | Array>) => Array => PubSub push/'push' eventNOTE: the first type is the default type
When decoding a Map to Map | object or a Set to Set, keys and members of type "Simple String" or "Blob String" will be decoded as strings which enables lookups by value, ignoring type mapping. If you want them as Buffers, decode them as Arrays instead.
These parts of RESP3 are not yet implemented in Redis itself (at the time of writing), so are not yet implemented in the Node-Redis client either: