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
This is duplicate of #1183. In JSON map keys can be only strings, so serde_json::Deserializer::deserialize_any returns strings to you. Flattening buffers the input using generic deserializer that uses serde_json::Deserializer::deserialize_any to capture data and then provide then. Unfortunately, because it is general, it is not aware that it's responsibility of the JSON key deserializer to convert strings to integers. From the other hand, usize::deserialize doesn't accept strings as valid input and returns error that you're see.
however when deleting the
#[serde(flatten)]
the deserialize won't errorThe text was updated successfully, but these errors were encountered: