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

jsWasmMain.kotlinx.serialization.json.internal.JsonToStringWriterJsWasm.kt Maven / Gradle / Ivy

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

internal actual open class JsonToStringWriter actual constructor(): InternalJsonWriter {
    private val sb = StringBuilder(128)

    actual override fun writeLong(value: Long) {
        sb.append(value)
    }

    actual override fun writeChar(char: Char) {
        sb.append(char)
    }

    actual override fun write(text: String) {
        sb.append(text)
    }

    actual override fun writeQuoted(text: String) {
        sb.printQuoted(text)
    }

    actual override fun release() {
        sb.clear()
    }

    actual override fun toString(): String {
        return sb.toString()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy