app.cybrid.cybrid_api_id.client.infrastructure.Serializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cybrid-api-id-kotlin Show documentation
Show all versions of cybrid-api-id-kotlin Show documentation
Auto-generated Cybrid SDK for Kotlin
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()
}
}