We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From https://docs.rs/serde_json/1.0.68/serde_json/fn.to_string_pretty.html:
I assume that if I call
use serde_json::*; to_string_pretty<Value>(...);
I can .unwrap() this result safely, is it right? Or Value's implementation of Serialize might decide to fail?
.unwrap()
Value
Serialize
If it's the former, can I make a PR adding this piece of info to this doc page?
The text was updated successfully, but these errors were encountered:
Looking at the source code, it seems Value's Serialize impl indeed cannot fail:
json/src/value/ser.rs
Lines 13 to 36 in 931ee23
I think a PR to state this in the docs is a good idea, although the docs should be added to Value, not to_string_pretty.
to_string_pretty
Sorry, something went wrong.
No branches or pull requests
From https://docs.rs/serde_json/1.0.68/serde_json/fn.to_string_pretty.html:
I assume that if I call
I can
.unwrap()
this result safely, is it right? OrValue
's implementation ofSerialize
might decide to fail?If it's the former, can I make a PR adding this piece of info to this doc page?
The text was updated successfully, but these errors were encountered: