Is there a way to check if a given KClass extends ...
# getting-started
m
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
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
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