-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VecSkipError fails on tagged enum #711
Comments
Can you please provide more details for your bug report? Without knowing how your serialized data looks and what data format you are using, there isn't anything actionable for me to do here. |
Thanks for responding so quickly. For some reason my My serialize function; fn serialize<S>(&self, ser: S) -> Result<S::Ok, S::Error> where S: serde::Serializer {
self.pixels.serialize(ser)
} I'm using RON, and my data appears as;
I believe the issue is the inner parenthesis around the integers. I'm not completely clear on why deser thinks |
RON is a complicated format. Its data format is more complicated than what can be modelled well with the serde API. This means it needs to have the context of the Rust types for proper deserialization. Any buffering will cause problems, for example ron-rs/ron#500. Maybe the v0.9 design of RON will help a bit. |
I have the following example;
I have tracked the issue down to this match. At which point, the value of err reads 'expected "string or map", found "a sequence"'.
My tagged enum is getting serialized as a Seq. It appears that the inner content deserializer doesn't expect nested sequences? I'm not sure how to continue investigating, but deserializing straight to Vec works fine with normal Serde, I would expect VecSkipError to just drop in. I cannot use the derives because my types have other constraints.
Thanks!
The text was updated successfully, but these errors were encountered: