Arnav Singh
Arnav Singh
It's not a known issue, but it's possible. The serde library is format-independent but an individual `(De)Serialize` impl [isn't necessarily format-independent.](https://github.com/serde-rs/serde/issues/690#issuecomment-272758210) bincode isn't a self-describing format so it's possible the...
Ah, the "invalid type: sequence, expected Ingress" error made me remember. It's because bincode serializes structs as sequences of fields, and why `#[derive(serde::Deserialize)]` accepts both maps and sequences of fields...
Yes, that's the "sequence stuff" I referred to.
>I can see if adding sequence stuff to the codegen's `Deserialize` impls is sufficient, or if the `skip_serializing_if` things will still break. Indeed, I realized while adding the sequence stuff...
>Hmm.. in looking for a compact alternative to bincode, I tried MessagePack, and got exactly the same result :( MessagePack is self-describing, so I figured it'd support `map` and `deserialize_identifier`....
>I'm not sure if it's possible to branch based on the capabilities of the serializer, but I'm not sure how else to approach such a problem. It's not. Like I...
Actually, I forgot that `SerializeStruct` has `skip_field` in the first place. Currently the impls just ignore `None` fields, but they could be changed to call `skip_field` for them. However even...
Might still work for rmp though?
It might work for bincode too, actually. To be clear, I'm saying their respective impls of `skip_field` can act like the caller called `serialize_none`. I can change k8s-openapi to always...
[Here's](https://github.com/Arnavion/k8s-openapi/compare/fix-91) what I'm proposing from k8s-openapi's side. See [`Pod`'s impls](https://github.com/Arnavion/k8s-openapi/blob/fix-91/src/v1_18/api/core/v1/pod.rs#L1812-L1951) for an example.