Replacing Newtonsoft.Json with System.Text.Json (experimental)

This commit is contained in:
Florian Zevedei
2024-09-25 16:56:03 +02:00
parent f21dec5f1c
commit 0e8e96f2d8
8 changed files with 248 additions and 25 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
@@ -126,7 +126,7 @@ public class MessageResult : ResultBase
T cd = null;
try
{
cd = JsonConvert.DeserializeObject<T>(RawData);
cd = JsonSerializer.Deserialize<T>(RawData);
return cd;
}