https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
h

hmole

10/13/2018, 4:17 PM
I have an mpp module with
1.3-rc146
and gradle
4.7
. Can I use latest
kotlinx.serialization
with
@Serializable
and
@Optional
in common module and parse json with it in native? @sandwwraith
t

thevery

10/13/2018, 5:00 PM
Yes, just supply DataClass.serializer() as first argument to JSON.parse()
h

hmole

10/13/2018, 5:45 PM
Do I need to add any extra dependencies besides
org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.8.2-rc13
in common module? Because currently it doesn't compile for ios targets. It can't find the annotations from runtime.
h

hmole

10/14/2018, 9:08 AM
Hmm, I've read that doc but somehow missed that part. Thanks.