From 12995b8d64e1548f6999a1ea4455b958b8e5bf52 Mon Sep 17 00:00:00 2001 From: root <295172551@qq.com> Date: Sat, 26 Jul 2025 02:18:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E7=94=A8json=20=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/X1.WebSocket/Models/TransferProtocolLog.cs | 14 ++------------ src/X1.WebSocket/X1.WebSocket.csproj | 1 + 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/X1.WebSocket/Models/TransferProtocolLog.cs b/src/X1.WebSocket/Models/TransferProtocolLog.cs index 24369c2..74e1f6a 100644 --- a/src/X1.WebSocket/Models/TransferProtocolLog.cs +++ b/src/X1.WebSocket/Models/TransferProtocolLog.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; using System.Threading.Tasks; namespace X1.WebSocket.Models @@ -76,18 +74,10 @@ namespace X1.WebSocket.Models public IEnumerable? MessageDetail { get => !string.IsNullOrEmpty(MessageDetailJson) - ? JsonSerializer.Deserialize>(MessageDetailJson, new JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull - }) + ? Newtonsoft.Json.JsonConvert.DeserializeObject>(MessageDetailJson) : null; set => MessageDetailJson = value != null - ? JsonSerializer.Serialize(value, new JsonSerializerOptions - { - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - WriteIndented = true - }) + ? Newtonsoft.Json.JsonConvert.SerializeObject(value) : null; } diff --git a/src/X1.WebSocket/X1.WebSocket.csproj b/src/X1.WebSocket/X1.WebSocket.csproj index db5a62d..0c6638e 100644 --- a/src/X1.WebSocket/X1.WebSocket.csproj +++ b/src/X1.WebSocket/X1.WebSocket.csproj @@ -16,6 +16,7 @@ +