Expand description
Careful serialization and deserialization of rust_decimal types.
Several tests in these modules will fail if one were to naively apply e.g.,
#[serde(with = "rust_decimal::serde::float_option")].
This module provides alternative modules to be used with #[serde(with = ...)].
This circumvents bugs in the rust_decimal::serde modules and adds modules for serialization
and deserialization of Option<Option<Decimal>>.
- use double_option_float for
Option<Option<Decimal>>where the field may be missing and may be null. - use non_required_float for
Option<Decimal>where the field may be missing but may not be null. - use nullable_float for
Option<Decimal>where the field is required but may be null. - use double_option_str for
Option<Option<Decimal>>where the field may be missing and may be null. - use non_required_str for
Option<Decimal>where the field may be missing but may not be null. - use nullable_str for
Option<Decimal>where the field is required but may be null. - use
double_option_arbitrary_precisionforOption<Option<Decimal>>where the field may be missing and may be null. - use
non_required_arbitrary_precisionforOption<Decimal>where the field may be missing but may not be null. - use
nullable_arbitrary_precisionforOption<Decimal>where the field is required but may be null.
Modulesยง
- double_
option_ arbitrary_ precision rust-decimal-arbitrary-precision - Combination of the serde rules from
rust_decimal::serde::arbitrary_precisionandserde_with::rust::double_option. - double_
option_ float - Combination of the serde rules from rust_decimal::serde::float and
serde_with::rust::double_option. - double_
option_ str - Combination of the serde rules from rust_decimal::serde::str and
serde_with::rust::double_option. - non_
required_ arbitrary_ precision rust-decimal-arbitrary-precision - Serialization and deserialization of not required but not nullable decimals as numbers with arbitrary precision.
- non_
required_ float - Serialization and deserialization of not required but not nullable decimals as floats.
- non_
required_ str - Serialization and deserialization of not required but not nullable decimals as strings.
- nullable_
arbitrary_ precision rust-decimal-arbitrary-precision - Serialization and deserialization of required but nullable decimals with arbitrary precision.
- nullable_
float - Serialization and deserialization of required but nullable decimals as floats.
- nullable_
str - Serialization and deserialization of required but nullable decimals as strings.