[][src]Function serde_sexpr::from_str

pub fn from_str<T: DeserializeOwned>(s: &str) -> Result<T>

Deserialize an instance of T from an S-Expression in a string.

Examples

let s = "(Hello! |Goodbye,\\ world!| |\\)\\|\\(|)";
let value: Vec<String> = serde_sexpr::from_str(s).unwrap();
assert_eq!(value, vec!["Hello!".to_string(), "Goodbye, world!".to_string(), ")|(".to_string()]);