v0.9.1 SerializationException: Can't locate argument-less serializer
See original GitHub issue@Serializable
data class Data(var txt: String)
@UseExperimental(ImplicitReflectionSerializer::class)
fun main() {
val myData = Data("Blah blah")
val js = JSON.unquoted.stringify(myData)
println(js)
}
will throw
Exception in thread "main" kotlinx.serialization.SerializationException: Can't locate argument-less serializer for class MainKt$main$Data. For generic classes, such as lists, please provide serializer explicitly.
at kotlinx.serialization.PlatformUtilsKt.serializer(PlatformUtils.kt:28)
at kotlinx.serialization.context.ContextKt.getOrDefault(Context.kt:39)
at MainKt.main(Main.kt:15)
at MainKt.main(Main.kt)
I’m on version 0.9.1 which fixed Bug #250. I’m a bit confused now, because it seems like the same Bug is popping up on me now. Did I miss something here?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Error to serialize message when sending to kafka topic
I'd say the error is obvious: Can't convert value of class org.springframework.messaging.support.
Read more >Custom Serializers in Apache Kafka - Baeldung
In this tutorial, we'll see how to implement Kafka default format converters and custom serializers for specific use cases.
Read more >Avro Schema Serializer and Deserializer
A SerializationException may occur during the send call, if the data is not well formed. ... To see how this works and test...
Read more >How To Use Java Serializers With Kafka - Big Endian Data
The String and Byte array serializers are provided by Kafka out-of-the-box ... SerializationException: Can't convert key of class java.time.
Read more >serializer - GitHub Pages
SerializationException. if serializer cannot be created (provided type or its type argument is not serializable). fun SerializersModule.serializer(type: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue seems unrelated to 250 and is more likely caused by non-applied plugin or another problems with your project setup
If you have any questions left, feel free to reopen.