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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user