From 2067964a801cdb951e419450514187ca4904b40f Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Thu, 22 May 2025 18:20:36 -0500 Subject: [PATCH] Demo use of JSON deserialization It Just Works. Praise the Rust macros. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 346e55e..395f581 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use gt_tools::ReleaseInfo; use reqwest::Error; use reqwest::header::{ @@ -19,7 +20,7 @@ async fn main() -> Result<(), Error> { .header(ACCEPT, "application/json") .send() .await?; - let body_text: String = response.text().await?; + let body_text: Vec = response.json().await?; println!("{:?}", body_text); Ok(())