C#C
C#14mo ago
Core

✅ How is JsonConverter(typeof(JsonStringEnumConverter<MyEnum>)) evaluated?

Hello,

This makes it possible that enum is serialized to string when the request comes in.

Is this evaluated on each request, or only once at compile time?

c#
[JsonConverter(typeof(JsonStringEnumConverter<Precipitation>))]
public enum Precipitation
{
    Drizzle, Rain, Sleet, Hail, Snow
}
Was this page helpful?