-
Notifications
You must be signed in to change notification settings - Fork 794
serde_json arbitrary_precision flag causes conflicts #2206
Comments
@gakonst Is it possible to remove the feature |
If |
That did not make sense of course. For JSON number values |
I'm hitting this as well. In particular, it's causing the canonicalization of JSON data for cryptographic signing to fail. Is the |
It also breaks usage of async-graphql async-graphql/async-graphql#1198 |
yeah, this feature is kinda fucked and we should not force anyone into using it, afaik this is only used for deserialization of u256 numbers, which should be fine to not support since most of the time they're either hex or fit in u64 |
Version
current master branch, this is NOT an issue with 1.0.2.
Description
In the following commit there was an update to use the
serde_json
arbitrary_precision
feature. This feature has been known to cause problems with theserde_json
macros as documentedhere
, with the currently tracking issue here. What will happen is that anyone that uses theethers
package will see problems when attempting to use thetag
untagged
andflatten
macros. The open issues mentioned show multiple examples of this. Below is an example that I have.I tried this code:
[dependencies]
serde_json = { version = "1.0.64", default-features = false, features = ["arbitrary_precision"] }
I expect in the example above for the
result
to resolve toM { value: 10.1 }
Instead i get the following error:
panicked at 'called `Result::unwrap()` on an `Err` value: Error("data did not match any variant of untagged enum TempM", line: 0, column: 0)'
When disabling the
arbitrary_precision
flag this correctly resolves.The text was updated successfully, but these errors were encountered: