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

kotlin-client.jvm-common.infrastructure.UUIDAdapter.kt.mustache Maven / Gradle / Ivy

package {{packageName}}.infrastructure

import com.squareup.moshi.FromJson
import com.squareup.moshi.ToJson
import java.util.UUID

{{#nonPublicApi}}internal {{/nonPublicApi}}class UUIDAdapter {
    @ToJson
    fun toJson(uuid: UUID) = uuid.toString()

    @FromJson
    fun fromJson(s: String) = UUID.fromString(s)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy