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
@NotNull
abstract fun format(@NotNull data: Any): String
Format the input data into the service's output format.
Link copied to clipboard
abstract fun <T> parse(@NotNull input: String, @NotNull clazz: Class<T>): T
Parse input strings to strongly typed objects.
Link copied to clipboard
@NotNull
abstract fun <T> parseList(@NotNull input: String, @NotNull clazz: Class<T>): List<T>
Deserializes the input into a list of instances of T.
Link copied to clipboard
@NotNull
abstract fun <K, V> parseMap(@NotNull input: String, @NotNull keyClass: Class<K>, @NotNull valueClass: Class<V>): Map<K, V>
Deserializes the input into a map of instances of V keyed by K