Expand description
Custom deserialization module for handling strings as optional f64.
Used for fields like avg_price or leverage that may be empty or absent in API responses. Empty strings are treated as None, ensuring proper handling of optional numerical fields.
Functionsยง
- deserialize
- Deserializes a string to an
Option<f64>, returningNonefor empty strings. - serialize
- Serializes an
Option<f64>as a string.