use std::collections::{BTreeSet, HashSet}; use serde_query::Deserialize; #[derive(Debug, Deserialize)] struct Commits { #[query(".[].sha")] _shas: Vec, #[query(".[].committer.id")] _committer_ids: HashSet, #[query(".[].committer.login")] _committers: HashSet, #[query(".[].commit.author.date")] _dates: BTreeSet, } #[test] fn test_list_commits() { const INPUT: &str = include_str!("./commits.json"); let commits: Commits = serde_json::from_str(INPUT).unwrap(); println!("{:?}", commits); }