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
Hi I am not sure if this is intended but when deserialize from JSON string, escaped \ does not seems to unescape.
use serde::Deserialize;#[derive(Deserialize)]structData{data:String,}fnmain(){let raw_data = r#"{"data":"test\\.data"}"#;let data = serde_json::from_str::<Data>(raw_data).unwrap();println!(">>>data: {:?}", data.data);// return "test\\.data" instead of "test\.data"}
Hi I am not sure if this is intended but when deserialize from JSON string, escaped
\
does not seems to unescape.Rust playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=72e2e0e83410f7a5977287a58c247eca
The text was updated successfully, but these errors were encountered: