MapperDeserializationStrategy

open class MapperDeserializationStrategy<I, O>(base: DeserializationStrategy<I>, deserialize: (I) -> O) : DeserializationStrategy<O>

Use this serializer when you have deserializable type I and want to map it to some O in process of deserialization

Parameters

base

Serializer for I

deserialize

Will be used in deserialize method to convert deserialized by base to O

Constructors

Link copied to clipboard
fun <I, O> MapperDeserializationStrategy(base: DeserializationStrategy<I>, deserialize: (I) -> O)

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): O

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Extensions

Link copied to clipboard
inline fun <I : Any, O> DeserializationStrategy<I>.mapDeserialization(noinline deserialize: (I) -> O): MapperDeserializationStrategy<I, O>

Will create MapperDeserializationStrategy to allow you to map I to O using deserialize lambda during deserialization process