All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jsTest.kotlinx.serialization.json.JsonDynamicImplicitNullsTest.kt Maven / Gradle / Ivy

There is a newer version: 1.7.3
Show newest version
package kotlinx.serialization.json

import kotlinx.serialization.KSerializer

class JsonDynamicImplicitNullsTest : AbstractJsonImplicitNullsTest() {
    override fun  Json.encode(value: T, serializer: KSerializer): String {
        return JSON.stringify(encodeToDynamic(serializer, value))
    }

    override fun  Json.decode(json: String, serializer: KSerializer): T {
        val x: dynamic = JSON.parse(json)
        return decodeFromDynamic(serializer, x)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy