Hi, I'm using serialization 1.5.30 and I'm having ...
# serialization
a
Hi, I'm using serialization 1.5.30 and I'm having a weird issue when I try to parse a JSON :
Copy code
Exception in thread "main" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Expected end of the object '}', but had '{' instead
JSON input: {"keywords":[],"softKeywords":[],"modifierKeywords":[],"specialIdentifiers":[],"operators":[]}
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
	at kotlinx.serialization.json.internal.JsonLexer.fail(JsonLexer.kt:493)
	at kotlinx.serialization.json.internal.JsonLexer.fail(JsonLexer.kt:215)
s
What class are you trying to parse?
a
Copy code
@Serializable
object Language {
   val keywords = emptyList<String>()
   val operators = emptyList<String>()
   val softKeywords = emptyList<String>()
   val modifierKeywords = emptyList<String>()
   val specialIdentifiers = emptyList<String>()
}
oh I'm dumb it's an object so it can't be instancied