crummy
04/04/2020, 9:52 PM{
"values": [
[
"Plums",
5
],
[
"Apples"
4
]
]
}
If the quantities were strings I'd do values: List<List<String>> but this fails with Expected string literal. Can I do this?turansky
04/04/2020, 10:42 PMList<List<Any>> - as is contractturansky
04/04/2020, 10:43 PMcrummy
04/04/2020, 10:47 PMAny I get Serializer has not been found for type "Any"turansky
04/04/2020, 11:08 PMturansky
04/04/2020, 11:08 PM[String, Int] ?crummy
04/04/2020, 11:08 PMturansky
04/04/2020, 11:12 PMdata class Row(
val name: String,
val count: Int
)turansky
04/04/2020, 11:13 PMvalues: List<Row>crummy
04/04/2020, 11:22 PMkotlinx.serialization.json.JsonDecodingException: Unexpected JSON token at offset 78: Expected '{, kind: CLASS'.turansky
04/04/2020, 11:55 PMcrummy
04/04/2020, 11:57 PMPaul Woitaschek
04/06/2020, 2:25 PMturansky
04/06/2020, 3:02 PMPaul Woitaschek
04/06/2020, 3:03 PMcrummy
04/06/2020, 9:44 PMPaul Woitaschek
04/07/2020, 8:30 AMsandwwraith
04/07/2020, 10:43 AMisLenient = true in json configuration. It makes parser more flexible and allows to parse non-quoted literals as strings