tuweni / org.apache.tuweni.scuttlebutt.rpc / RPCMessage / asJSON

asJSON

fun <T : Any!> asJSON(objectMapper: ObjectMapper!, clazz: Class<T>!): T (source)

Provides the body of the message, marshalled as a JSON object.

Parameters

objectMapper - ObjectMapper!: the object mapper to deserialize with

clazz - Class<T>!: the JSON object class

- the matching JSON object class

Exceptions

IOException - if an error occurs during marshalling

Return
T: a new instance of the JSON object class