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
{{ message }}
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
This issue was labelled with: A-libs, I-papercut in the Rust repository
If one wants to convert an Encodable type to a Json value, then one has to do something like (i.e. encode as JSON to a string and then parse that string):
let foo = something_to_convert_to_json;let s = do std::io::with_str_writer |w| {
foo.encode(&mut extra::json::Encoder(w));};let json = match extra::json::from_str(s){Ok(j) => j,Err(_) => fail!("Rust output some json it doesn't understand itself.")};
The text was updated successfully, but these errors were encountered:
I'm going to close this now that this crate is deprecated in favor of serde. We're discontinuing feature development in rustc-serialize but will still continue to merge bug fixes if they arise.
Tuesday Aug 06, 2013 at 14:08 GMT
For earlier discussion, see rust-lang/rust#8335
This issue was labelled with: A-libs, I-papercut in the Rust repository
If one wants to convert an
Encodable
type to aJson
value, then one has to do something like (i.e. encode as JSON to a string and then parse that string):The text was updated successfully, but these errors were encountered: