pub fn deserialize_json<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Decimal, D::Error>Expand description
Deserializes an exact decimal directly from a quoted or unquoted JSON token.
Works without arbitrary precision. Use before Value buffering to preserve source digits.
Serde internally tagged and untagged enum buffers do not support this raw-token route.
ยงErrors
Returns an error if:
- The input is null, an empty string, a non-decimal shape, or an invalid decimal.
- Representing the value requires rounding.