1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-18 09:00:59 +00:00

Some small improvements and fixes

This commit is contained in:
JKorf
2024-03-22 16:41:19 +01:00
parent de72fe4fb9
commit 8ddd9ecf22
4 changed files with 76 additions and 22 deletions
@@ -92,9 +92,10 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
{
JsonTokenType.String => reader.GetString(),
JsonTokenType.Number => reader.GetInt16().ToString(),
JsonTokenType.True => "true",
JsonTokenType.False => "false",
_ => null
JsonTokenType.True => reader.GetBoolean().ToString(),
JsonTokenType.False => reader.GetBoolean().ToString(),
JsonTokenType.Null => null,
_ => throw new Exception("Invalid token type for enum deserialization: " + reader.TokenType)
};
if (string.IsNullOrEmpty(stringValue))