Why serialization can't to serialize collection with nullable items in ProtoBuf?
Copy code
@Serializable
data class MyData(val myList: List<String?>)
I found out, that serializer set property
nullableMode = NotNull
, but it is set for list, items in list can be nullable
e
ephemient
11/26/2022, 12:43 PM
for a non-repeated property, "null" is "missing", but a list is represented by a repeated tag. how do you expect to repeat a missing value in protobuf?
a
Andrey Tabakov
11/26/2022, 12:52 PM
hm
e
ephemient
11/26/2022, 12:55 PM
if you wrote
Copy code
@Serializable
data class NullableString(val value: String? = null)
@Serializable
data class MyData(val myList: List<NullableString>)
it would work but have a different representation, of course