Derive Serialize, Deserialize for num_bigint::BigInt

  1. I am using . I have:
#[derive(serde::Serialize, serde::Deserialize)]
pub struct BigFloat {
  big_int: num_bigint::BigInt,
  exp: num_bigint::BigInt,
  1. This appears to not be working due to BigInt not implementing serde Serialize/Deserialize.

  2. What is the easiest way to add serde::Serialize/Deserialize for BigFloat?

By adding the serde feature to num-bigint in your Caro.toml. This will implement Serialize/Deseriialize for BitInt

1 Like

@KrishnaSannasi : yeah, just dug up the response from @cuviper at

It looks like you are trying to implement bigdecimal

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.