null is not deserialized correctly
Using this with Podman will result in invalid type: null, expected a sequence on many endpoints, as empty lists are omitted in favor of null.
I'm not sure if this is an issue in my usage or some change within Serde.
Can you point me to the varlink structs which have the problem?
Normally "null" means None, and the struct field should be an Option/nullable denoted with a ?.
type MyType (
example_nullable_array: ?[]string,
example_nullable_dictionary: ?[string]string,
example_nullable_stringset: ?[string](),
example_nullable_array_struct: ?[](first: int, second: string)
)
The rust varlink generator will produce a #[serde(skip_serializing_if = "Option::is_none")] in this case
Podman's varlink implementation often gives null in place of an empty array (they use optional arrays too in other places, but those of course work fine). The CLI will reveal this just fine, showing null in place of the array whenever it is empty, but of course other usage will expect a specific type and produce an error.