#[test] fn test_field_name() { use serde_query::{DeserializeQuery, Query}; #[derive(DeserializeQuery)] struct Data { #[query(r#".["field name with spaces"]"#)] with_space: i64, } let document = serde_json::json!({ "field name with spaces": 42, }) .to_string(); let data: Data = serde_json::from_str::>(&document) .unwrap() .into(); assert_eq!(data.with_space, 42); }