Is there a way to check if a given KClass extends another KClass? I saw isSubclassOf but that doesn't exist in Kotlin/Native it seems
If no good way to do that exists, is there a way to easily define structs that can automatically be converted to a ByteArray?
r
Roukanken
09/28/2022, 6:17 AM
If no good way to do that exists, is there a way to easily define structs that can automatically be converted to a ByteArray?
You mean "serialization"? Look at #serialization, the library afaik provides fairly easy way to serialize stuff with Protobuf 2
(Though note that anything non-JSON is experimental afaik)
m
martmists
09/28/2022, 11:29 AM
Protobuf does not seem like a good solution, as the encoding does not match how a C struct would be represented in memory, and as such I would be sending invalid packets over USB