Does anyone know of a multi-platform way to create...
# multiplatform
j
Does anyone know of a multi-platform way to create an instance of an annotation at runtime? As far as I can tell, there is none.
o
But what is the purpose of doing that?
j
Writing a custom serial descriptor for KotlinX Serialization
o
Not sure if it could be done like that in Native at least
j
I think it would be good to either allow instantiating or extending an annotation or changing KotlinX serialization’s interface. I’m actually for the former, as Java already supports it and using the annotation classes directly in the API makes for easier reading of annotations.