KotlinxSerializer
class KotlinxSerializer : JsonSerializer
A JsonSerializer implemented for kotlinx Serializable classes. Since serializers are determined statically, you must set the mapping for each Serializable class to it’s KSerializer manually, using setMapper or register.
KotlinxSerializer().apply { register<MySerializable>() }
Constructors
KotlinxSerializer(json: Json = Json.plain) A JsonSerializer implemented for kotlinx Serializable classes. Since serializers are determined statically, you must set the mapping for each Serializable class to it’s KSerializer manually, using setMapper or register. |
Functions
Read content from response using information specified in type. |
|
Set the mapping from T to mapper. Set the mapping from T to it’s KSerializer. This method only works for non-parameterized types. |
|
Set the mapping from List to mapper. Set the mapping from List to it’s KSerializer. This method only works for non-parameterized types. |
|
Set mapping from type to generated KSerializer. |
|
Set mapping from type to generated KSerializer. |
|
fun write( Convert data object to OutgoingContent. |
Inherited Functions
open fun write(data: Any): OutgoingContent Convert data object to OutgoingContent. |