Skip to content

Commit c659d53

Browse files
PR feedback
1 parent edd1343 commit c659d53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
using System.Net;
1010
using System.Net.Http;
1111
using System.Runtime.InteropServices;
12+
using System.Text.Json;
1213
using System.Threading.Tasks;
1314
using Microsoft.AspNetCore.Http;
14-
using Newtonsoft.Json;
1515
using WsProxy;
1616

1717
namespace Microsoft.AspNetCore.Builder
@@ -97,12 +97,12 @@ private static void UseVisualStudioDebuggerConnectionRequestHandlers(this IAppli
9797
});
9898

9999
context.Response.ContentType = "application/json";
100-
await context.Response.WriteAsync(JsonConvert.SerializeObject(proxiedTabInfos));
100+
await context.Response.WriteAsync(JsonSerializer.Serialize(proxiedTabInfos));
101101
}
102102
else if (requestPath.Equals("/json/version", StringComparison.OrdinalIgnoreCase))
103103
{
104104
context.Response.ContentType = "application/json";
105-
await context.Response.WriteAsync(JsonConvert.SerializeObject(new Dictionary<string, string>
105+
await context.Response.WriteAsync(JsonSerializer.Serialize(new Dictionary<string, string>
106106
{
107107
{ "Browser", "Chrome/71.0.3578.98" },
108108
{ "Protocol-Version", "1.3" },
@@ -267,7 +267,7 @@ private static async Task<IEnumerable<BrowserTab>> GetOpenedBrowserTabs(string d
267267
{
268268
using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
269269
var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
270-
return JsonConvert.DeserializeObject<BrowserTab[]>(jsonResponse);
270+
return JsonSerializer.Deserialize<BrowserTab[]>(jsonResponse);
271271
}
272272

273273
class BrowserTab

0 commit comments

Comments
 (0)