<PackageReference Include="System.Text.Json" Version="9.0.1" />

JsonStringEnumConverter

Converts enumeration values to and from strings.

Initializes an instance of the JsonStringEnumConverter class with the default naming policy that allows integer values.

public JsonStringEnumConverter(JsonNamingPolicy namingPolicy = null, bool allowIntegerValues = true)

Initializes an instance of the JsonStringEnumConverter class with a specified naming policy and a value that indicates whether undefined enumeration values are allowed.