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
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.")};