โจ New `EmailAddressAsStringSerializer` type
LVMVRQUXL opened this issue ยท 0 comments
LVMVRQUXL commented
๐ Description
In the types-kotlinx-serialization
subproject, we want to introduce the EmailAddressAsStringSerializer
experimental type for serializing the EmailAddress
type as String
. This serializer should be available for all Kotlin platforms.
class EmailAddressAsStringSerializer : KSerializer<EmailAddress> {
override val descriptor: SerializerDescriptor
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun serialize(encoder: Encoder, value: EmailAddress)
override fun deserialize(decoder: Decoder): EmailAddress
override fun toString(): String
}
Finally, we want to deprecate the KotoolsTypesSerializers.emailAddress
experimental property with an error level for using this new serializer instead.
โ Checklist
- โจ Add the type and its primary constructor with documentation, samples and tests.
- โจ Override the
toString()
function with documentation, samples and tests. - โจ Override the
equals(Any?)
function with documentation, samples and tests. - โจ Override the
hashCode()
function with documentation, samples and tests. - โจ Make the type implementing the
KSerializer<EmailAddress>
type with documentation, samples and tests. - ๐๏ธ Deprecate the
KotoolsTypesSerializers.emailAddress
property. - ๐ Update the unreleased changelog for this issue.
- ๐ Create another issue for removing the
KotoolsTypesSerializers.emailAddress
deprecated property for the next iteration.