Skip to content

Commit

Permalink
Support for overriding enum field name in JsonConverterEnum -- Fix co…
Browse files Browse the repository at this point in the history
…mpile error. (dotnet#31081)
  • Loading branch information
jmaine committed May 27, 2020
1 parent 3752e5e commit 11da374
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerial
return value;
}
}
if (_converterOptions.HasFlag(EnumConverterOptions.AllowStrings) && token == JsonTokenType.Null && _stringToEnumCache != null && _stringToEnumCache.TryGetValue(ValueTuple.Create(null), out T value)) {
if (_converterOptions.HasFlag(EnumConverterOptions.AllowStrings) && token == JsonTokenType.Null && _stringToEnumCache != null && _stringToEnumCache.TryGetValue(ValueTuple.Create<string>(null), out T value)) {
return value;
}

Expand Down

0 comments on commit 11da374

Please sign in to comment.