kotlinx.serialization Questions
2
Solved
I am in the process of converting from Moshi to kotlinx serialization with Ktor and when I try to make a request to get data I am getting this error
kotlinx.serialization.MissingFieldException: Fi...
Mcclendon asked 12/11, 2020 at 2:9
3
I have followed a tutorial to create a custom serialization for my generic class. But I am still stacked with error:
SerializationException: Serializer for class 'ApiResponse' is not
found. Mark t...
Sacks asked 23/10, 2020 at 16:55
2
Solved
I'm trying to upload multiple files.
val ktorVersion = "1.5.0"
val serializationVersion = "1.0.1"
That is how I'm doing that:
override suspend fun uploadFiles(
binaryFiles: M...
Intercalation asked 21/1, 2021 at 11:1
1
Solved
Here is my pojo class
@Serializable
data class Response(
@SerialName("message") val message: String?,
@SerialName("parameters") val parameters: Map<String, String>?
)
A...
Kaliningrad asked 30/6, 2021 at 10:12
2
Solved
I have a simple hierarchy containing of the following:
abstract class BaseItem
open class Item : BaseItem
class Backpack : Item
They should all work with Kotlinx Serialization. It went fine until...
Madrigalist asked 21/4, 2021 at 18:6
3
Solved
I am trying to serialize polymorphic classes using kotlinx.serialization with kotlin/native. I am using the sample provided in the serialization guide:
val module = SerializersModule {
polymorphic...
Paapanen asked 18/9, 2020 at 14:18
1
How to serialize a library class to Protobuf with kotlinx.serialization? Since it's non-editable, I can't add @SerialId annotations to its properties as instructed in runtime_usage.md#protobuf. If ...
Goodness asked 27/1, 2020 at 10:30
2
Solved
I have the following data class
@Serializable
data class Income(val id: String,
val description: String,
val amount: Int,
val Time: Date,
val userId: String)
now when I try to use the .s...
Boynton asked 29/2, 2020 at 11:17
1
I would like my Spring Boot project to use kotlinx.serialization. I can't figure out how to swap the mapper correctly... If I wanted to use GSON, I could just note it in the props via spring.http.c...
Parfleche asked 23/3, 2020 at 15:34
1
Solved
I'm trying to deserialize a JSON file to a Kotlin data class I cannot control using kotlinx.serialization.
The class looks something along the lines of:
public data class Lesson(
val uid: String,
...
Goldy asked 13/12, 2020 at 4:6
1
Solved
I'm trying to deserialize following String:
val stringJson = "{\"decomposed\":[\", \",{\"id\":4944372,\"name\":\"Johny\",\"various\"...
Marney asked 25/10, 2020 at 21:32
1
Solved
Actually, the main problem is still that there are no reified typeargs for classes in Kotlin. But here is why this bothers me in this specific case:
Suppose you have a wrapper class Wrapper that ta...
Kunstlied asked 1/10, 2020 at 12:36
1
Solved
We are making our next project in the company with kotlin multiplatform. Everything worked fine until I tried to create a release version for android to beta test. I got this error in release versi...
Renick asked 29/6, 2020 at 12:31
0
I need to inject a local value to a class constructor during deserialization. For example, look at the following class.
@Serializable
class SomeClass(val local: Context, val serialized: String)
...
Kishke asked 30/3, 2020 at 0:29
3
Solved
In my Android app, I want to add a Bundle including a Place object described below to my Intent. Since serializable was slow and not recommended, I preferred Parcelable.
Althoug I use Kotlin 1.3.3...
Tc asked 7/5, 2019 at 8:46
1
Suppose there is one interface , and 2 (or more) implementations :
interface IRunnable {
fun run()
}
class Horse : IRunnable {
override fun run() { println("horse running") }
}
class Dog : IRu...
Inoperative asked 23/12, 2019 at 9:38
1
I'm making a request to a request to an API and the response is a JSON object, this json object contains a string that is another json object. I'm trying to use kotlinx.serialization to handle the ...
Gintz asked 18/7, 2019 at 16:57
1
Solved
I've been playing with Kotlinx.serialisation. I've been trying to find a quick way to use Kotlinx.serialisation to create a plain simple JSON (mostly to send it away), with minimum code clutter.
F...
Reprovable asked 29/3, 2019 at 12:6
2
I'm creating a Kotlin Multiplatform library; actually I got 3 modules ( common, jvm and js ),
In the classpath I got: classpath "org.jetbrains.kotlin:kotlin-serialization:${versions.kotlin}"
And ...
Shimmer asked 27/10, 2018 at 13:40
© 2022 - 2025 — McMap. All rights reserved.