1 2 3 4 5 6 7 8 9 10 11 12
//! Run with: //! //! ```not_rust //! cargo run --example try_bencode_to_json //! ``` use bencode2json::try_bencode_to_json; fn main() { let result = try_bencode_to_json(b"d4:spam4:eggse").unwrap(); assert_eq!(result, r#"{"spam":"eggs"}"#); }