<@U0BRK9HC5> and where there is some examples, I a...
# announcements
o
@gildor and where there is some examples, I am looking at it and cant find... I remember there where some tests somewhere which had this, but I am probably too stupid to find it
g
Examples of usage?
There is probably no implementation about mapping map to protobuf, but it’s possible if you write own adapter, it’s pretty straight forward
but you can serialize Kotlin class to protobuf out of the box
o
come again?
how I can serialize kotlin class into protobuf?
essentially I need to pass mapOf<String,Any> over the wire, and it might not be human readable, and that "Any" will be mostly primitives, or other such maps/lists nothing fancy
g
kotlinx.serialization allow you to do that (serilize Kotlin class into Protobuf), check examples: https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/examples.md
kotlinx.serialization allows to serialize Kotlin data classes to any format, you just should write custom format implementation. For example take a look on this example: https://github.com/Kotlin/kotlinx.serialization/blob/master/example-jvm/src/CustomKeyValueDemo.kt