net.resp.wire

as-input

added in 3.0

(as-input val format)

creates an input from value

(as-input {:a 1} :json) => “{"a":1}”

call

added in 3.0

(call remote command)

completes a request on the wire

close

(close remote)

coerce

added in 3.0

(coerce output)(coerce output format)

coerces redis return to bytes

coerce-bytes

added in 3.0

(coerce-bytes bytes format)

coerces bytes to data

(coerce-bytes (.getBytes “OK”) :json) => “OK”

(coerce-bytes (serialize-bytes {:a 1} :json) :json) => {:a 1}

deserialize-bytes

added in 3.0

(deserialize-bytes bytes format)

converts bytes back to data structure

(deserialize-bytes (serialize-bytes {:a 1} :json) :json) => {:a 1}

read

(read remote)

serialize-bytes

added in 3.0

(serialize-bytes val format)

serializes objects (data) to bytes

(h/string (serialize-bytes “HELLO” :string)) => “HELLO”

write

(write remote command)