-
Notifications
You must be signed in to change notification settings - Fork 558
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
Deserialize failed when open feature "arbitrary_precision" under #[serde(untagged)]
#559
Comments
When deserialializing into untagged enum, serde_json will fail serde-rs/json#559
Here's another example that does not include a |
In polkadot: ---- call_function_actually_work stdout ---- thread 'call_function_actually_work' panicked at 'called `Result::unwrap()` on an `Err` value: RpcTransactionError { code: -32700, message: "Parse error", data: None }', node/test/service/tests/call-function.rs:29:60 Issues related: serde-rs/json#559 serde-rs/serde#773
There is a trick to circumvent this issue: let val = serde_json::from_str::<serde_json::Value>(input)?;
T::deserialize(val) |
I just spent 2 hours tearing my hairs out. My project worked fine with serde_json without Looks like tracing-bunyan-formatter already has an issue for this. |
This fixes token deserialization when the serde_json/arbitrary_precision feature is enabled. See serde-rs/json#559 for details. Co-authored-by: James Hinshelwood <james.hinshelwood@bigpayme.com>
Hi:
I need some features for u128 support, thus we open "arbitrary_precision" feature. I already get that under "arbitrary_precision", all number is serialize/deserialize in string, but I find that the deserialize would be failed under
#[serde(untagged)]
struct.like this:
serde_json version: 1.0.40
this code would panic:
I think there may be some bug in serde drive for feature "arbitrary_precision".
we must use u128 in our projects, thus this is important for us.
thank you very much!
The text was updated successfully, but these errors were encountered: