JsonMarshallingService

@DoNotImplement
interface JsonMarshallingService : MarshallingService

JsonMarshallingService marshalls to and from JSON using the registered JSON mapper.

The platform will provide an instance of JsonMarshallingService to flows via property injection.

Example usage:

See also

Functions

Link copied to clipboard
abstract fun format(data: Any): String

Format the input data into the service's output format.

Link copied to clipboard
abstract fun <T> parse(input: String, clazz: Class<T>): T

Parse input strings to strongly typed objects.

Link copied to clipboard
abstract fun <T> parseList(input: String, clazz: Class<T>): List<T>

Deserializes the input into a list of instances of T.

Extensions

Link copied to clipboard
inline fun <T> MarshallingService.parse(input: String): T

Parse input strings to strongly typed objects.

Link copied to clipboard
inline fun <T> MarshallingService.parseList(input: String): List<T>

Deserializes the input into a list of instances of T.