Breyta

Deila með


JsonStringEnumConverter<TEnum> Constructors

Definition

Overloads

JsonStringEnumConverter<TEnum>()

Initializes a new instance of JsonStringEnumConverter<TEnum> with the default naming policy and that allows integer values.

JsonStringEnumConverter<TEnum>(JsonNamingPolicy, Boolean)

Initializes a new instance of JsonStringEnumConverter<TEnum>.

JsonStringEnumConverter<TEnum>()

Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs

Initializes a new instance of JsonStringEnumConverter<TEnum> with the default naming policy and that allows integer values.

public:
 JsonStringEnumConverter();
public JsonStringEnumConverter ();
Public Sub New ()

Applies to

JsonStringEnumConverter<TEnum>(JsonNamingPolicy, Boolean)

Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs
Source:
JsonStringEnumConverter.cs

Initializes a new instance of JsonStringEnumConverter<TEnum>.

public JsonStringEnumConverter (System.Text.Json.JsonNamingPolicy? namingPolicy = default, bool allowIntegerValues = true);
new System.Text.Json.Serialization.JsonStringEnumConverter<'Enum (requires 'Enum : struct)> : System.Text.Json.JsonNamingPolicy * bool -> System.Text.Json.Serialization.JsonStringEnumConverter<'Enum (requires 'Enum : struct)>
Public Sub New (Optional namingPolicy As JsonNamingPolicy = Nothing, Optional allowIntegerValues As Boolean = true)

Parameters

namingPolicy
JsonNamingPolicy

Optional naming policy for writing enum values.

allowIntegerValues
Boolean

true to allow undefined enum values. When true, if an enum value isn't defined, it outputs as a number rather than a string.

Applies to