fun <T : Any!> asJSON(objectMapper: ObjectMapper!, clazz: Class<T>!): T
(source)
Provides the body of the message, marshalled as a JSON object.
objectMapper
- ObjectMapper!: the object mapper to deserialize with
clazz
- Class<T>!: the JSON object class
- the matching JSON object class
IOException
- if an error occurs during marshalling
Return
T: a new instance of the JSON object class