ListWrapSerializer

open class ListWrapSerializer<T : Any>(elementSerializer: KSerializer<T>) : JsonTransformingSerializer<List<T>> (source)

Utility serializer that always wraps the specified data in a list if it is not already so.

(Implementation based from the JSON transforming docs

Constructors

Link copied to clipboard
constructor(elementSerializer: KSerializer<T>)

Inherited properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Inherited functions

Link copied to clipboard
override fun deserialize(decoder: Decoder): List<T>
Link copied to clipboard
override fun serialize(encoder: Encoder, value: List<T>)