Closed GTB3NW closed 3 years ago
error[E0277]: the trait bound `std::option::Option<u32>: FromStr` is not satisfied
--> src/types.rs:91:32
|
91 | #[serde(deserialize_with = "deserialize_number_from_string")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FromStr` is not implemented for `std::option::Option<u32>`
|
::: <REDACTED>
|
111 | T: FromStr + serde::Deserialize<'de>,
| ------- required by this bound in `serde_aux::field_attributes::deserialize_number_from_string`
I have now RTFM - deserialize_option_number_from_string
Sorry for any notification!
Hi I'm having an issue with conditional serialization.
The payload:
"price":null
I can't change price to
Option<u32>
since it isn't compatible withdeserialize_number_from_string
.I think this is a bug?