es this type using the <a href="https://kotlinlang.org/api/kotlinx.serialization/kotlinx-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: NotEmptyList&lt;Int&gt; = notEmptyListOf(1, 2, 3)<br>val encoded: String = Json.encodeToString(string)<br>assertEquals(expected = "[1,2,3]", actual = encoded)<br>val decoded: NotEmptyList&lt;Int&gt; = J