```@Serializable data class RowBinMeta(val name: S...
# serialization
j
Copy code
@Serializable
data class RowBinMeta(val name: String, val coord: Array<Int>, val typ: /*an enum*/ TypeMemento)
Copy code
val meta: List<RowBinMeta> =  RowBinMeta.RowBinMetaList(elements)
val out = Json(JsonConfiguration.Default).toJson( meta  )
Exception in thread "main" kotlinx.serialization.SerializationException: Can't locate argument-less serializer for class kotlin.collections.List. For generic classes, such as lists, please provide serializer explicitly. what am i missing?
Copy code
    val out = Json(JsonConfiguration.Default).toJson(RowBinMeta::class.serializer().list, meta  )
is extremely counter-intuitive. im sure this is costly for the community to have to thread so many github issues to arrive at something that could be in the README
f
Does it work without the ::class?
j
no, presumably it would work if it was just RowBinMeta and not the list of same
there are some intellij popups adding annotations here and there for serialization as well
i have 7000 of these but at least its a start.
s
'Quick example' from root README.md says
Copy code
val jsonList = json.stringify(Data.serializer().list, listOf(Data(42)))
: https://github.com/Kotlin/kotlinx.serialization#quick-example