You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sunli829 Thanks so much for the quick implementation!
Two observations:
Could you change the serialisation from to_string to normalize? This will give cleaner responses.
Less importantly: I wonder if we can somehow make this a json Number instead of a String. I understand that on one hand while initially parsing a json-string into the json value dictionary some loss of precision could already occur, as the json number is most likely represented as float internally, so letting the value stay a string is possibly the only way to keep complete accuracy. On the other hand this way we lose type safety and compatibility with calling js here - annoying. For now with the normalization this should be good enough and keeping the precision is by far most important, but maybe someone will find a better way to represent this. Or maybe make this accept both a string and a number for now, but output as string only?
Hey there,
I would love to directly deserialize incoming API requests into rust_decimal::Decimal without precision loss.
Currently with
I get
the trait bound 'rust_decimal::Decimal: poem_openapi::types::Type' is not satisfied
.Can compatibility for this be added? Maybe behind a feature gate, like in mysql_common?
The text was updated successfully, but these errors were encountered: