Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern crate serde_json;
- use std::collections::BTreeMap;
- fn main() {
- let yaml = r#"[{"a1": "b1", "a2": "b2", "a3": "b3"}, {"c1": "b4", "c2": "b5", "c3": "b6"}]"#;
- let vec: Vec<BTreeMap<&str, &str>> = serde_json::from_str(&yaml).map_err(|e| println!("{:?}", e)).unwrap();
- println!("{:?}", vec);
- }
Add Comment
Please, Sign In to add comment