How to serialize Enum fields to String instead of an Int in ASP.NET MVC Core 3.0? I\'m not able to do it the old way.
services.AddMvc().AddJsonOptions(opts
some addition:
if use Newtonsoft.Json
Install-Package Microsoft.AspNetCore.Mvc.NewtonsoftJson
services
.AddControllers()
.AddNewtonsoftJson(options =>
options.SerializerSettings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter()));
options.SerializerSettings.Converters
SerializerSettings
is necessary