You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is your use-case and why do you need this feature?
For example, in Compose code, one might want to save the user's custom theme by serializing Colors. These are defined as value class Color(value: ULong) which should be trivial to (de-)serialize, as value classes guarantee a single-argument constructor and a single field to handle.
Describe the solution you'd like
Value classes are serialized as if serialize(myXTypeValue.value) was called, and deserialized like XType(deserialize(encValue))
The text was updated successfully, but these errors were encountered:
Even if the property is serializable, we still need the value class Color to be marked as @Serializable too. This comes from the fact that in constructions like List<Color> actual boxing happens (i.e. instantiation of a new Color instance, not just ULong). And to properly serialize/deserialize the class instance, a corresponding serializer have to be generated, since we can't write one serializer to deserialize all possible value classes — that's not how the compiler plugin works
What is your use-case and why do you need this feature?
For example, in Compose code, one might want to save the user's custom theme by serializing
Color
s. These are defined asvalue class Color(value: ULong)
which should be trivial to (de-)serialize, as value classes guarantee a single-argument constructor and a single field to handle.Describe the solution you'd like
Value classes are serialized as if
serialize(myXTypeValue.value)
was called, and deserialized likeXType(deserialize(encValue))
The text was updated successfully, but these errors were encountered: