-
Notifications
You must be signed in to change notification settings - Fork 107
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
u128
(and i128
) serialization are not supported
#540
Comments
So support this, our choices are
For reference,
If we support this, a |
I'm curious, normally |
It is being used in a blockchain application, where u128 will be used for storing the rewards earned by the user. Due to precision issues (like satoshi's for bitcoin), u128 was a safer choice. |
I can understand the hardships. I could work around this by having a custom type which wraps u128 and serialize it into/from string. |
Annoyingly `toml` (the crate) doesn't support `u128` (toml-rs/toml#540), so we instead take the configured values as strings and parse them into `u128`s later.
Annoyingly `toml` (the crate) doesn't support `u128` (toml-rs/toml#540), so we instead take the configured values as strings and parse them into `u128`s later.
Annoyingly `toml` (the crate) doesn't support `u128` (toml-rs/toml#540), so we instead take the configured values as strings and parse them into `u128`s later.
Annoyingly `toml` (the crate) doesn't support `u128` (toml-rs/toml#540), so we instead take the configured values as strings and parse them into `u128`s later.
Annoyingly `toml` (the crate) doesn't support `u128` (toml-rs/toml#540), so we instead take the configured values as strings and parse them into `u128`s later.
Minimal reproducible error:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=a9c27b8a6032ebfbbef9cea1908be5dc
In this example, u128/i128 support is already present in serde. Yet, when used with toml, it fails and says u128 is not supported for serialization.
The text was updated successfully, but these errors were encountered: