What is serde::de::IgnoredAny
actually for? Doesn't serde ignore unknown fields by default?
It's not for ignoring unknown fields. It's for implementing deserializers which have to deserialize the remainder of a collection in order to skip ahead correctly when the type being deserialized doesn't fully consume the collection (sequence or map). See e.g. my crate neodyn_xc
.
How does serde manage to skip unknown fields then?
What do you mean? It does seem to use IgnoredAny
internally, but you don't have to specify that when deriving Deserialize
.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.