Module rust_decimal::serde
source · Available on crate feature
serde
and (crate features serde-with-str
or serde-with-float
or serde-with-arbitrary-precision
) only.Expand description
Serde specific functionality to customize how a decimal is serialized/deserialized (serde_with
)
Modules§
- arbitrary_
precision serde-with-arbitrary-precision
Serialize/deserialize Decimals as arbitrary precision numbers in JSON using thearbitrary_precision
feature withinserde_json
. - arbitrary_
precision_ option serde-with-arbitrary-precision
Serialize/deserialize optional Decimals as arbitrary precision numbers in JSON using thearbitrary_precision
feature withinserde_json
. - float
serde-with-float
Serialize/deserialize Decimals as floats. - float_
option serde-with-float
Serialize/deserialize optional Decimals as floats. - str
serde-with-str
Serialize/deserialize Decimals as strings. This is particularly useful when using binary encoding formats. - str_
option serde-with-str
Serialize/deserialize optional Decimals as strings. This is particularly useful when using binary encoding formats.
Structs§
- Decimal
From String serde-with-arbitrary-precision