Hi,
It would be useful to support direct conversions between BigDecimal and serde_json::Value when the serde-json feature is enabled.
Currently, we can serialize/deserialize via Serde, but not convert directly without manual handling. Proposed additions:
Both gated under #[cfg(feature = "serde-json")].
This would remove boilerplate and probably improve performance compared to custom implementations by the user.
Hi,
It would be useful to support direct conversions between
BigDecimalandserde_json::Valuewhen theserde-jsonfeature is enabled.Currently, we can serialize/deserialize via Serde, but not convert directly without manual handling. Proposed additions:
impl From<BigDecimal> for ValueValue::Numberwhen representable; otherwise fallback toValue::String.implTryFrom for BigDecimal`Numbers directly and parseStringsBoth gated under
#[cfg(feature = "serde-json")].This would remove boilerplate and probably improve performance compared to custom implementations by the user.