1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-17 08:30:53 +00:00

Some small fixes in the System.Text.Json ArrayConverter, added support for flags in EnumConverter

This commit is contained in:
Jkorf
2025-01-27 11:52:07 +01:00
parent c693eb8c02
commit 0527a8a76e
3 changed files with 17 additions and 6 deletions
@@ -172,6 +172,13 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
return true;
}
if (objectType.IsDefined(typeof(FlagsAttribute)))
{
var intValue = int.Parse(value);
result = Enum.ToObject(objectType, intValue);
return true;
}
try
{
// If no explicit mapping is found try to parse string