All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.testit.kotlin.client.infrastructure.Serializer.kt Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package ru.testit.kotlin.client.infrastructure

import com.squareup.moshi.Moshi
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory

object Serializer {
    @JvmStatic
    val moshiBuilder: Moshi.Builder = Moshi.Builder()
        .add(OffsetDateTimeAdapter())
        .add(LocalDateTimeAdapter())
        .add(LocalDateAdapter())
        .add(UUIDAdapter())
        .add(ByteArrayAdapter())
        .add(URIAdapter())
        .add(KotlinJsonAdapterFactory())
        .add(BigDecimalAdapter())
        .add(BigIntegerAdapter())

    @JvmStatic
    val moshi: Moshi by lazy {
        moshiBuilder.build()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy