serialization.json/-json">JavaScript Object Notation (JSON) format from kotlinx.serialization</a>:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">val address = EmailAddress("contact@kotools.org")<br>val encoded: String = Json.encodeToString(address)<br>println(encoded) // "contact@kotools.org"<br>val decoded: EmailAddress = Json.decodeFromString(encoded)<br>println(decoded == address) // true</code></pre><span class="top-right-position"><span class="copy-icon"></span><div