Get rid of Newtonsoft.Json everywhere but the HTTP abstractions

This commit is contained in:
Daan Boerlage 2021-11-01 01:04:20 +01:00
parent 7b06965f14
commit cf0cd743b8
Signed by: daan
GPG key ID: FCE070E1E4956606
15 changed files with 105 additions and 48 deletions

View file

@ -27,7 +27,6 @@
<PackageReference Include="HtmlAgilityPack" Version="1.11.36" />
<PackageReference Include="JikanDotNet" Version="1.6.0" />
<PackageReference Include="MtgApiManager.Lib" Version="1.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="PokeApi.NET" Version="1.1.2" />
<PackageReference Include="Sentry" Version="3.9.2" />
</ItemGroup>

View file

@ -1,10 +1,11 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Geekbot.Bot.Commands.Integrations.LolMmr
{
public class LolMrrInfoDto
{
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
[JsonPropertyName("avg")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public decimal Avg { get; set; } = 0;
}
}

View file

@ -1,19 +1,19 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Geekbot.Bot.Commands.Utils.Corona
{
public record CoronaApiCountryResponseDto
{
[JsonProperty("country")]
[JsonPropertyName("country")]
public string Country { get; init; }
[JsonProperty("cases")]
[JsonPropertyName("cases")]
public decimal Cases { get; init; }
[JsonProperty("deaths")]
[JsonPropertyName("deaths")]
public decimal Deaths { get; init; }
[JsonProperty("recovered")]
[JsonPropertyName("recovered")]
public decimal Recovered { get; init; }
}
}