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
The to_string and to_vec functions are currently defined to return Result<..., serde_json::Error>. serde_json guarantees that serializing to string will only fail if the type's Serialize impl decides to fail or if the type does not map to legal json, for example because of non-string keys. For syn-serde all of the data structures are designed to be compatible with json and their Serialize impls never decide to fail on their own, so it should be fine to unwrap the errors from serde_json::to_string and remove those errors from the API of syn-serde.
to_writer still needs to return Result because std::io is all fallible.
The text was updated successfully, but these errors were encountered:
The to_string and to_vec functions are currently defined to return
Result<..., serde_json::Error>
. serde_json guarantees that serializing to string will only fail if the type's Serialize impl decides to fail or if the type does not map to legal json, for example because of non-string keys. For syn-serde all of the data structures are designed to be compatible with json and their Serialize impls never decide to fail on their own, so it should be fine to unwrap the errors from serde_json::to_string and remove those errors from the API of syn-serde.to_writer still needs to return Result because std::io is all fallible.
The text was updated successfully, but these errors were encountered: