How can I parse sealed class from string? With enu...
# getting-started
i
How can I parse sealed class from string? With enum I can iterate over its values and find it, but can I do the same with sealed class?
d
You can use KClass#sealedSubclasses, but it requires the full Kotlin reflection library
👍 1
v
If you use moshi you could use this extensions https://github.com/ZacSweers/MoshiX/tree/main/moshi-sealed
👍 1
i
Thanks! I will dig into it
🙂 1
a