Join Slack
Communities
Powered by
Is kotlinx serialization the right tool for a form...
# serialization
z
Zyle Moore
06/22/2024, 5:07 AM
Is kotlinx serialization the right tool for a format that supports a large number of
T
types, but not an arbitrary amount? If an unsupported type is specified when calling
decodeFromString
, should a
SerializationException
be thrown?
Zyle Moore
06/22/2024, 5:08 AM
As an example, imagine a format that supports only integers and booleans, not floats or strings.
g
glureau
06/25/2024, 7:05 AM
You can have a custom serializer and limit yourself how it should work, but I'm not sure I get your point. A recent discussion could help you:
https://kotlinlang.slack.com/archives/C7A1U5PTM/p1718924987750389?thread_ts=1718799542.134009&cid=C7A1U5PTM
3
Views
Open in Slack
Previous
Next