From d6bf3e3223b6fb72a039ad9bc195c39fe826d2f9 Mon Sep 17 00:00:00 2001 From: Itamar Haber Date: Sun, 12 Mar 2023 12:36:34 +0200 Subject: [PATCH] Adds RESP2 map pattern --- docs/reference/protocol-spec.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/protocol-spec.md b/docs/reference/protocol-spec.md index a0647577ac..ccc052ebf6 100644 --- a/docs/reference/protocol-spec.md +++ b/docs/reference/protocol-spec.md @@ -494,6 +494,12 @@ Both map keys and values can be any of RESP's types. Redis clients should return the idiomatic dictionary type that their language provides. However, low-level programming languages (such as C, for example) will likely return an array along with type information that indicates to the caller that it is a dictionary. +{{% alert title="Map pattern in RESP2" color="info" %}} +RESP2 doesn't have a map type. +Maps in RESP2 are represented by arrays, in which each element is a key-value tuple. +Each tuple is an array with two elements, these being the key and the value. +{{% /alert %}} + ### Sets