Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Feature/2863 tags (#2901)
Browse files Browse the repository at this point in the history
* [IVY-2863] Tag Entities

* [IVY-2863] DB Migration

* [IVY-2863] Tag DAOs & POJOs

* [IVY-2863] Tags Entity Remodelling

* [IVY-2863] Fix Tags Detekt Errors
  • Loading branch information
Vishwa-Raghavendra authored Feb 4, 2024
1 parent 7dac92c commit b7586f2
Show file tree
Hide file tree
Showing 16 changed files with 1,166 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.ivy.base.kotlinxserilzation

import androidx.annotation.Keep
import kotlinx.serialization.KSerializer
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import java.time.Instant

@Keep
object KSerializerInstant : KSerializer<Instant> {
override val descriptor = PrimitiveSerialDescriptor(
"Instant",
PrimitiveKind.LONG
)

override fun deserialize(decoder: Decoder): Instant {
return Instant.ofEpochMilli(decoder.decodeLong())
}

override fun serialize(encoder: Encoder, value: Instant) {
encoder.encodeLong(value.toEpochMilli())
}
}
Loading

0 comments on commit b7586f2

Please sign in to comment.