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

asBytes

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

Serialize body to bytes.

Parameters

objectMapper - ObjectMapper!: the object mapper to serialize to bytes with

Exceptions

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

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