kingsley
10/27/2020, 10:33 AMKarlo Lozovina
10/27/2020, 10:36 AMencodeDefaults work?kingsley
10/27/2020, 10:37 AMencodeDefaults only works for serializing back to jsonKarlo Lozovina
10/27/2020, 10:39 AMnull ...Javier
10/27/2020, 10:40 AMignoreUnknownKeys = true ?Javier
10/27/2020, 10:41 AM@Serializable
data class Some(val property: String? = null)Karlo Lozovina
10/27/2020, 10:42 AMkingsley
10/27/2020, 10:42 AMnull works, but I was hoping to avoid that. Since the field’s already nullable
ignoreUnknownKeys only works for json keys that don’t exist in my modelKarlo Lozovina
10/27/2020, 10:42 AMKarlo Lozovina
10/27/2020, 10:42 AMJavier
10/27/2020, 10:43 AMKarlo Lozovina
10/27/2020, 10:43 AMSomeType? = null basically everywherekingsley
10/27/2020, 10:44 AMJavier
10/27/2020, 10:44 AMKarlo Lozovina
10/27/2020, 10:44 AM@file::UseSerializersJavier
10/27/2020, 10:46 AMJson used by jake converter?Karlo Lozovina
10/27/2020, 10:46 AMkingsley
10/27/2020, 10:49 AMserializerModule + @Contextual annotation. But I also have another field of the same type but I want a different serializer for that one. So I have to put @Serializable(with=Serializer::class), but I was hoping I could apply this on a custom annotation and then I can do @CustomAnnotation insteadkingsley
10/27/2020, 10:53 AMEnumJsonAdapter#withUnknownFallback, but kotlinx.serialization doesn’t seem to have anything similarkingsley
10/27/2020, 11:27 AM