Skip to content

Commit

Permalink
fix: give unique name to UUID's serial descriptor. Kotlin/kotlinx.ser…
Browse files Browse the repository at this point in the history
  • Loading branch information
rvbsm committed Sep 22, 2024
1 parent 352c821 commit 6bd7d8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import kotlinx.serialization.encoding.Encoder
import java.util.*

object UUIDSerializer : KSerializer<UUID> {
override val descriptor = PrimitiveSerialDescriptor("UUID", PrimitiveKind.STRING)
override val descriptor = PrimitiveSerialDescriptor("dev.rvbsm.UUID", PrimitiveKind.STRING)

override fun serialize(encoder: Encoder, value: UUID) = encoder.encodeString("$value")
override fun deserialize(decoder: Decoder): UUID = UUID.fromString(decoder.decodeString())
Expand Down

0 comments on commit 6bd7d8f

Please sign in to comment.