Skip to content

Commit

Permalink
Fix for JsonEnumValueConverter
Browse files Browse the repository at this point in the history
  • Loading branch information
o.nadymov committed Jun 7, 2024
1 parent 3627864 commit 251f392
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerial
value = reader.GetString();
}

foreach (var field in typeof(T).GetFields())
foreach (var field in typeof(T).GetFields(BindingFlags.Static | BindingFlags.Public))
{
if (field.GetCustomAttribute<JsonEnumValueAttribute>()?.Value == value)
{
Expand Down

0 comments on commit 251f392

Please sign in to comment.