MapperSerializer - DataDog/dd-sdk-android GitHub Wiki

class MapperSerializer<T : Any>(eventMapper: EventMapper<T>, serializer: Serializer<T>) : Serializer<T>

Combines EventMapper and Serializer. First mapping is done, then serialization.

Parameters

T type of the data to map and serialize.
eventMapper Event mapper to use.
serializer Serializer to use.

Constructors

MapperSerializer

constructor(eventMapper: EventMapper<T>, serializer: Serializer<T>)

Parameters
T type of the data to map and serialize.
eventMapper Event mapper to use.
serializer Serializer to use.

Functions

serialize

open override fun serialize(model: T): String?