JsonStringEnumConverter Class
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.
Converts enumeration values to and from strings.
public ref class JsonStringEnumConverter : System::Text::Json::Serialization::JsonConverterFactory
public ref class JsonStringEnumConverter sealed : System::Text::Json::Serialization::JsonConverterFactory
public class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
public sealed class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
type JsonStringEnumConverter = class
inherit JsonConverterFactory
Public Class JsonStringEnumConverter
Inherits JsonConverterFactory
Public NotInheritable Class JsonStringEnumConverter
Inherits JsonConverterFactory
- Inheritance
Reading is case insensitive. Writing can be customized by using a JsonNamingPolicy.
For more information, see How to customize property names and values with System.Text.Json.
Json |
Initializes an instance of the JsonStringEnumConverter class with the default naming policy that allows integer values. |
Json |
Initializes an instance of the JsonStringEnumConverter class with a specified naming policy and a value that indicates whether undefined enumeration values are allowed. |
Type |
Gets the type being converted by the current converter instance. (Inherited from JsonConverterFactory) |
Can |
Determines whether the specified type can be converted to an enum. |
Create |
Creates a converter for the specified type. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Produkt | Versioner |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
Feedback om .NET
.NET är ett öppen källkod projekt. Välj en länk för att ge feedback: