bigdecimal-rs icon indicating copy to clipboard operation
bigdecimal-rs copied to clipboard

how to serialize map value to a number instead of string?

Open mtfcd opened this issue 11 months ago • 0 comments

I know that struct fields can be serialize to numbers use #[serde(with = "bigdecimal::serde::json_num")]. but how to do that on maps like: HashMap<String, BigDecimal>? How to serialize it to {"number": 123.456}?

mtfcd avatar Nov 19 '24 03:11 mtfcd