KotlinX Serialization Standard Serializers (KS3)

This project aims to provide a set of serializers for common types.

Getting started

⚠️This library is currently being built and not published anywhere yet.

Add the dependency. With gradle:

dependencies {



Now you can start using the provided serializers. There’s several possible ways to do this.

Using typealias

typealias LocalDateTimeAsString = @Serializable(LocalDateTimeAsStringSerializer::class) LocalDateTime

data class Appointment(
  val datetime: LocalDateTimeAsString

For details, see the kotlinx.serialization guide

This method is most useful when you want to use different serial formats for the same type, or when you can’t configure the serializer itself.

Using @Contextual

See the details in kotlinx.serialization guide

class ProgrammingLanguage(
    val name: String,
    val stableReleaseDate: Date

private val module = SerializersModule {

val format = Json { serializersModule = module }


View Github