commonMain.com.huanshankeji.kotlinx.serialization.protobuf.NothingWorkaround.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-common-serialization-jvm Show documentation
Show all versions of kotlin-common-serialization-jvm Show documentation
Huanshankeji's common code libraries in Kotlin
The newest version!
package com.huanshankeji.kotlinx.serialization.protobuf
import com.huanshankeji.kotlinx.serialization.NOTHING_SUPPORTED_BY_KOTLINX_SERIALIZATION_MESSAGE
import com.huanshankeji.kotlinx.serialization.serializerNothingWorkaround
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.protobuf.ProtoBuf
@Deprecated(
NOTHING_SUPPORTED_BY_KOTLINX_SERIALIZATION_MESSAGE, ReplaceWith(
"this.encodeToByteArray(value)",
"kotlinx.serialization.encodeToByteArray"
)
)
@ExperimentalSerializationApi
inline fun ProtoBuf.encodeToByteArrayNothingWorkaround(value: T) =
@Suppress("DEPRECATION")
encodeToByteArray(serializerNothingWorkaround(), value)
@Deprecated(
NOTHING_SUPPORTED_BY_KOTLINX_SERIALIZATION_MESSAGE, ReplaceWith(
"this.decodeFromByteArray(bytes)",
"kotlinx.serialization.decodeFromByteArray"
)
)
@ExperimentalSerializationApi
inline fun ProtoBuf.decodeFromByteArrayNothingWorkaround(bytes: ByteArray) =
@Suppress("DEPRECATION")
decodeFromByteArray(serializerNothingWorkaround(), bytes)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy