From feb1b3e67b1f2010ca78e59ca986f7cef30318d7 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Thu, 31 Mar 2022 18:37:45 -0500 Subject: [PATCH] Use System.Text.Json instead of Newtonsoft. This reduces the size of the app because Newtonsoft and all the code it roots (XML, System.Data.Common) can now be trimmed. --- src/Mobile/Microsoft.NetConf2021.Maui.csproj | 2 +- src/Mobile/Services/ShowsService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mobile/Microsoft.NetConf2021.Maui.csproj b/src/Mobile/Microsoft.NetConf2021.Maui.csproj index 3411f48..4db9777 100644 --- a/src/Mobile/Microsoft.NetConf2021.Maui.csproj +++ b/src/Mobile/Microsoft.NetConf2021.Maui.csproj @@ -53,7 +53,7 @@ - + diff --git a/src/Mobile/Services/ShowsService.cs b/src/Mobile/Services/ShowsService.cs index ab6ee6b..e128d35 100644 --- a/src/Mobile/Services/ShowsService.cs +++ b/src/Mobile/Services/ShowsService.cs @@ -1,7 +1,7 @@ using System.Net.Http.Json; +using System.Text.Json; using Microsoft.NetConf2021.Maui.Models.Responses; using MonkeyCache.FileStore; -using Newtonsoft.Json; namespace Microsoft.NetConf2021.Maui.Services; @@ -116,7 +116,7 @@ public class ShowsService } else { - responseData = JsonConvert.DeserializeObject(json); + responseData = JsonSerializer.Deserialize(json); } if (responseData != null)