x-serialization-json/kotlinx.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 string: NotBlankString = "hello world".toNotBlankString()<br>    .getOrThrow()<br>val encoded: String = Json.encodeToString(string)<br>println(encoded) // "hello world"<br>val decoded: NotBlankString = Json.decodeFromString(encoded)<br>println(decoded == string) // true</code></pre><span class="t