SON) 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>assertEquals(expected = "\"hello world\"", actual = encoded)<br>val decoded: NotBlankString = Json.decodeFromString(encoded)<br>assertEquals(expected = string, actual = decoded)</code></pre><span class="top-right-position"><span class="copy-icon"