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

asJSON

open 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

open fun <T : Any!> asJSON(objectMapper: ObjectMapper!, typeReference: TypeReference<T>!): T (source)