Hide/remove some JSON utility classes (#1039)

This commit is contained in:
Stephen Toub
2025-10-01 01:38:46 -04:00
committed by GitHub
Unverified
parent 1ec98130d2
commit 498fc06fd6
3 changed files with 2 additions and 59 deletions
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Text.Json;
using Microsoft.Agents.AI.Hosting;
namespace AgentWebChat.Web;
@@ -13,7 +12,7 @@ public class AgentDiscoveryClient(HttpClient httpClient, ILogger<AgentDiscoveryC
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync(cancellationToken);
var agents = JsonSerializer.Deserialize<List<AgentDiscoveryCard>>(json, AgentHostingJsonUtilities.DefaultOptions) ?? [];
var agents = JsonSerializer.Deserialize<List<AgentDiscoveryCard>>(json) ?? [];
logger.LogInformation("Retrieved {AgentCount} agents from the API", agents.Count);
return agents;