Conrad Kramer
04/01/2022, 7:19 PMlistSerialDescriptor
assumes a homogenous array.
[{"key": "value"}, "string"]
In Swift, I can pull arbitrary types out of an UnkeyedDecodingContainer
in any order I needConrad Kramer
04/01/2022, 8:00 PMankushg
04/01/2022, 8:02 PMConrad Kramer
04/01/2022, 8:49 PMConrad Kramer
04/01/2022, 8:52 PMephemient
04/01/2022, 10:04 PMephemient
04/01/2022, 10:07 PMListSerializer(JsonElement.serializer())
(or equivalents) as a surrogate. It won't work for any format other than JSON, but this kind of structure also doesn't work with other formats so you're not really losing anythingConrad Kramer
04/02/2022, 4:07 AM