JsonStringEnumConverter<TEnum> 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<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
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
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om