(dev branch) has just been released! This is a companion release to Kotlin
1.3.20-eap-52
Highlights:
⢠Now Native plugin supports generics, @SerialInfo annotations and other features that were missing before
⢠Now
SerialDescriptor.getElementDescriptor
is working and one can use it to deeply inspect descriptors tree
⢠JSON now can omit default values
⢠(breaking change) Context serializer is not enabled automatically anymore, use
regarding the "omit default values":
when I have a simple class like this:
@Serializable
data class Test(val name: String? = null)
then Json(encodeDefaults = false).stringify(Test.serializer(), testInstance)
should print out "{}"? This doesn't seem to work for me
Jonas Bark
12/20/2018, 4:10 PM
got it - name needs to have @Optional. The documentation of @Optional got me confused š