How are platform specific annotations handled in c...
# multiplatform
d
How are platform specific annotations handled in common code? Say, in js I need to use kotlin serialization, whereas on the server, Micronaut uses Jackson...?
b
Copy code
// commonMain
expect annotation class Serializable

// jvmMain
actual typealias Serializable = JsonObject // or whatever jackson alternative is

// jsMain
actual typealias Serializable = kotlinx.serialization.Serializable
d
Yeah, but how would you handle the annotation's parameters? Like
@Json("realfieldname")
...?
b
Same way
typealias on one platform and delegate on the other