tuweni / org.apache.tuweni.scuttlebutt.rpc / RPCRequestBody / asBytes

asBytes

open fun asBytes(objectMapper: ObjectMapper): Bytes (source)

Parameters

objectMapper - the object mapper to serialize to bytes with

Exceptions

JsonProcessingException - thrown if there is a problem transforming the object to JSON.

Return
the bytes representation of this RPC request body. The request is first encoded into JSON, then from JSON to a byte array