kotlinx.serialization
kotlinx.serialization copied to clipboard
Provide a public API to instantiate enum serializer
In kotlinx.datetime we need a hand-rolled (because the serialization module is shipped separately) external serializer for enums (e.g. Month).
The problem is that we either have to access internal API (EnumSerializer) or re-implement both EnumSerializer and EnumSerialDescriptor from scratch
Note that obtaining the serializer via serializer<MyEnum>() is not an option because it does not work on JS and K/N