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

app.cybrid.cybrid_api_id.client.infrastructure.Serializer.kt Maven / Gradle / Ivy

There is a newer version: 0.122.72
Show newest version
package app.cybrid.cybrid_api_id.client.infrastructure

import com.google.gson.Gson
import com.google.gson.GsonBuilder
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.OffsetDateTime
import java.util.UUID

object Serializer {
    @JvmStatic
    val gsonBuilder: GsonBuilder = GsonBuilder()
        .registerTypeAdapter(OffsetDateTime::class.java, OffsetDateTimeAdapter())
        .registerTypeAdapter(LocalDateTime::class.java, LocalDateTimeAdapter())
        .registerTypeAdapter(LocalDate::class.java, LocalDateAdapter())
        .registerTypeAdapter(ByteArray::class.java, ByteArrayAdapter())

    @JvmStatic
    val gson: Gson by lazy {
        gsonBuilder.create()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy