Move away from NewtonSoft.Json
This commit is contained in:
parent
afb2102702
commit
bf38c7dc1a
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue