open fun toEncodedRpcMessage(objectMapper: ObjectMapper!): Bytes! (source)
Encode the RPC request as bytes.
objectMapper - ObjectMapper!: the object mapper to serialize the request with
JsonProcessingException - thrown if there is an error while serializing the request to bytes
Return
Bytes!: an RPC request serialized into bytes