# keyval/resp-parse Parse exactly one RESP frame (RESP2 or RESP3) from a byte string into a Deft value. Useful for server facades and tests; no server required. ## Syntax
[keyval/resp-parse "bytes"]
## Parameters - `$bytes` — exactly one complete RESP frame (string) Decodes `+` simple string, `-` error (→ `%Err{:message}`), `:` integer, `,` double, `#` boolean, `_` null, `$` bulk, `=` verbatim (prefix stripped), `!` blob, `*` array, `>` push, `~` set, and `%` map (string keys become keywords). ## Examples
[keyval/resp-parse "+OK\r\n"]                        # → "OK"
[keyval/resp-parse ":42\r\n"]                       # → 42
[keyval/resp-parse "_\r\n"]                         # → nil
[keyval/resp-parse "*2\r\n$3\r\nfoo\r\n:7\r\n"]     # → @{ "foo" 7 }
[keyval/resp-parse "-ERR nope\r\n"]                 # → %Err{:message "ERR nope"}
## Returns The decoded value. `%Err{:message "incomplete frame"}` for a partial frame; `%Err` for trailing bytes, protocol errors, or an error reply. ## See Also `keyval/resp-stringify`, `keyval/cmd`