Rediger

Del via


JsonStringEnumConverter Constructors

Definition

Overloads

JsonStringEnumConverter()

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

JsonStringEnumConverter(JsonNamingPolicy, Boolean)

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

JsonStringEnumConverter()

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

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

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

Applies to

JsonStringEnumConverter(JsonNamingPolicy, Boolean)

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

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

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

Parameters

namingPolicy
JsonNamingPolicy

The optional naming policy for writing enum values.

allowIntegerValues
Boolean

true to allow undefined enum values; otherwise, false. When true, if an enum value isn't defined, it will output as a number rather than a string.

Applies to