https://kotlinlang.org logo
#serialization
Title
# serialization
t

Tristan Caron

03/23/2018, 1:39 PM
Hello, Do you have an example of how to use
@SerialInfo
? I would like to use for deserialization. If a value is an empty string, I replace it by "NONE"
s

sandwwraith

03/23/2018, 4:30 PM
You can make usage of it if you have some customizable format. E.g. in protobuf it is used for serial tags, like that: https://github.com/Kotlin/kotlinx.serialization/blob/master/runtime/common/src/main/kotlin/kotlinx/serialization/protobuf/ProtoBuf.kt#L389
5 Views