question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sandwwraithcommented, Nov 24, 2018

This issue seems unrelated to 250 and is more likely caused by non-applied plugin or another problems with your project setup

0reactions
sandwwraithcommented, Apr 16, 2019

If you have any questions left, feel free to reopen.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found