r.0.9.1.source-code.Json.kt Maven / Gradle / Ivy
The newest version!
package se.wollan.tolr
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
internal inline fun T.toJson() = Json.encodeToString(this)
internal inline fun String.fromJson(): T = Json.decodeFromString(this)