Compare commits

...

2 Commits

Author SHA1 Message Date
Jeff Leung bf38c7dc1a Move away from NewtonSoft.Json 2024-01-08 23:28:35 -08:00
Jeff Leung afb2102702 Upgrade to .NET 8.0 2024-01-08 22:03:15 -08:00
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

View File

@ -1,6 +1,6 @@
using AS1024.CommunityDocumentationPage.Interfaces;
using AS1024.CommunityDocumentationPage.Models;
using Newtonsoft.Json;
using System.Text.Json;
using System.Net.Http.Headers;
namespace AS1024.CommunityDocumentationPage.DIScopes
@ -23,7 +23,9 @@ namespace AS1024.CommunityDocumentationPage.DIScopes
HttpResponseMessage result = await client.GetAsync(BuildNetBoxURI());
string stringResult = await result.Content.ReadAsStringAsync();
var temp =
JsonConvert.DeserializeObject<RouteTargets>(stringResult);
JsonSerializer.Deserialize<RouteTargets>(stringResult, new JsonSerializerOptions{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower
});
foreach (var route in temp.Results)
{