Skip to content

Commit

Permalink
utf8json -> system.text.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Svisstack committed Mar 29, 2024
1 parent ec85c33 commit 819b4fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Company>COINAPI LTD</Company>
<Copyright>COINAPI LTD or its affiliates</Copyright>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.6.0" />
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="Utf8Json" Version="1.3.7" />
<PackageReference Include="Microsoft.CSharp" Version="4.*" />
<PackageReference Include="System.Text.Json" Version="8.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using CoinAPI.WebSocket.V1.DataModels;
using Utf8Json;

namespace CoinAPI.WebSocket.V1.Testing
{
Expand Down
6 changes: 2 additions & 4 deletions data-api/csharp-ws/CoinAPI.WebSocket.V1/WSUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Threading.Tasks;
using System.IO;
using CoinAPI.WebSocket.V1.DataModels;
using Utf8Json;
using System.Text.Json;

namespace CoinAPI.WebSocket.V1
{
Expand Down Expand Up @@ -46,9 +46,7 @@ internal static class WSUtils

public static T ParseMessage<T>(MessageData messageData)
{
var jsonString = Encoding.ASCII.GetString(messageData.Data);
var messageObject = JsonSerializer.Deserialize<T>(jsonString);

var messageObject = JsonSerializer.Deserialize<T>(messageData.Data);
return messageObject;
}

Expand Down

0 comments on commit 819b4fc

Please sign in to comment.