Kotlin has a Duration class that is usable in JVM and JS. But how to serialize it between the two? I know how to write a serializer, so I’m really asking: how to round trip a Duration
with some other primitive value(s).
Does this always pass?
val dur: Duration = ...
assertEquals(dur.inSeconds.seconds, dur)