JsonStringEnumConverter Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk