EmailAddress
Deprecated
A better representation of email addresses exists in the `org.kotools.types` package. This one will be removed in v4.7.
Represents an email address.
Serialization and deserialization
The serialization and deserialization processes of this type behave like for the String type.
Here's an example of Kotlin code that encodes and decodes this type using the JavaScript Object Notation (JSON) format from kotlinx.serialization:
val address = EmailAddress("[email protected]")
val encoded: String = Json.encodeToString(address)
println(encoded) // "[email protected]"
val decoded: EmailAddress = Json.decodeFromString(encoded)
println(decoded == address) // true
Content copied to clipboard
Types
Link copied to clipboard
object Companion
Contains static declarations for the EmailAddress type.