This repository was archived by the owner on Aug 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Option<T>
does not round-trip
#5
Comments
This is a serde problem. The deserialization to |
The mentioned is was a bit different. So this is not fixed. @erickt Is it possible to make options round trip in languages like JSON and CBOR? |
@pyfisch: Yes, you should be able to. Here's how serde_json does it by overriding |
pyfisch
added a commit
that referenced
this issue
Mar 30, 2016
Sorry that it took so long. It was a bit more complicated than expected since I had to add one byte lookahead to the parser to correctly parse options. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This code fails with
thread '<main>' panicked at 'called
Result::unwrap()on an
Errvalue: SyntaxError(invalid syntax: "incorrect type", 0)', ../src/libcore/result.rs:738
I have code in production that fails with "trailing bytes" when I have a structure whose last element is an Option; I haven't produced a small test case because it's such a PITA to write Serialize/Deserialize impls for structures.
The text was updated successfully, but these errors were encountered: