Hey, I'm trying to use a @Serializable annotation ...
# announcements
r
Hey, I'm trying to use a @Serializable annotation on a data class for decoding JSON from a string, but it looks like the annotation isn't being applied because it gives this error:
kotlinx.serialization compiler plugin is not applied to the module, so this annotation would not be processed. Make sure that you've setup your buildscript correctly and re-import project.
When I add "org.jetbrains.kotlin.plugin.serialization" to the plugins though, it gives me different errors which I don't really understand:
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
. For reference, this is in a Jetpack Compose Desktop app, if that has anything to do with the issue. Anyone know the problem?
d
Which version of things are you using?
r
For serialization I have the dependency
Copy code
org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1
and the plugin
Copy code
kotlin("plugin.serialization") version "1.4.10"
(Both of these are taken from the kotlinx.serialization repo)
d
This issue has been fixed in 1.4.30 iirc.
r
Nope, still isn't working :/
d
Hmm, the issue is on the serialization repo. You can follow that.
112 Views