diff --git a/clients/src/MvcAutomaticTokenManagement/Controllers/HomeController.cs b/clients/src/MvcAutomaticTokenManagement/Controllers/HomeController.cs index 44f113d37..a2d5d5b52 100644 --- a/clients/src/MvcAutomaticTokenManagement/Controllers/HomeController.cs +++ b/clients/src/MvcAutomaticTokenManagement/Controllers/HomeController.cs @@ -1,6 +1,6 @@ -using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; +using System.Text.Json; using System.Net.Http; using System.Threading.Tasks; @@ -27,7 +27,7 @@ public async Task CallApi() var client = _httpClientFactory.CreateClient("client"); var response = await client.GetStringAsync("identity"); - ViewBag.Json = JArray.Parse(response).ToString(); + ViewBag.Json = JsonDocument.Parse(response).ToString(); return View(); } diff --git a/clients/src/MvcJarJwt/Controllers/HomeController.cs b/clients/src/MvcJarJwt/Controllers/HomeController.cs index 44f113d37..a2d5d5b52 100644 --- a/clients/src/MvcJarJwt/Controllers/HomeController.cs +++ b/clients/src/MvcJarJwt/Controllers/HomeController.cs @@ -1,6 +1,6 @@ -using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; +using System.Text.Json; using System.Net.Http; using System.Threading.Tasks; @@ -27,7 +27,7 @@ public async Task CallApi() var client = _httpClientFactory.CreateClient("client"); var response = await client.GetStringAsync("identity"); - ViewBag.Json = JArray.Parse(response).ToString(); + ViewBag.Json = JsonDocument.Parse(response).ToString(); return View(); } diff --git a/clients/src/MvcJarUriJwt/Controllers/HomeController.cs b/clients/src/MvcJarUriJwt/Controllers/HomeController.cs index 44f113d37..a2d5d5b52 100644 --- a/clients/src/MvcJarUriJwt/Controllers/HomeController.cs +++ b/clients/src/MvcJarUriJwt/Controllers/HomeController.cs @@ -1,6 +1,6 @@ -using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; +using System.Text.Json; using System.Net.Http; using System.Threading.Tasks; @@ -27,7 +27,7 @@ public async Task CallApi() var client = _httpClientFactory.CreateClient("client"); var response = await client.GetStringAsync("identity"); - ViewBag.Json = JArray.Parse(response).ToString(); + ViewBag.Json = JsonDocument.Parse(response).ToString(); return View(); }