using System.Net.Http.Json;
JsonSerializerOptions _options = new()
PropertyNameCaseInsensitive = true
using HttpClient httpClient = new();
Joke[]? jokes = await httpClient.GetFromJsonAsync<Joke[]>(
"https://official-joke-api.appspot.com/jokes/programming/random", _options);
string text = joke is not null
? $"{joke.Setup}{Environment.NewLine}{joke.Punchline}"
public record Joke(int Id, string Type, string Setup, string Punchline);