Resolves ArgumentException when processing 0.15.5 loot

Resolves the following exception:

System.ArgumentException: .NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals'
This commit is contained in:
Refringe 2024-10-31 22:42:26 -04:00
parent f6f2acd842
commit 0719a7bfdd
Signed by untrusted user: Refringe
GPG Key ID: 7715B85B4A6306ED

View File

@ -9,6 +9,7 @@ public class NetJsonSerializer : IJsonSerializer
private static JsonSerializerOptions _serializeOptions = new()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals,
Converters =
{
new NetJsonKeyConverter(),