JsonStringEnumConverter クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
列挙値を文字列との間で変換します。
public ref class JsonStringEnumConverter : System::Text::Json::Serialization::JsonConverterFactory
public ref class JsonStringEnumConverter sealed : System::Text::Json::Serialization::JsonConverterFactory
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JsonStringEnumConverter cannot be statically analyzed and requires runtime code generation. Applications should use the generic JsonStringEnumConverter<TEnum> instead.")]
public class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
public sealed class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
public class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JsonStringEnumConverter cannot be statically analyzed and requires runtime code generation. Consider authoring a custom converter that is not a factory to work around the issue. See https://github.com/dotnet/runtime/issues/73124.")]
public class JsonStringEnumConverter : System.Text.Json.Serialization.JsonConverterFactory
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JsonStringEnumConverter cannot be statically analyzed and requires runtime code generation. Applications should use the generic JsonStringEnumConverter<TEnum> instead.")>]
type JsonStringEnumConverter = class
inherit JsonConverterFactory
type JsonStringEnumConverter = class
inherit JsonConverterFactory
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JsonStringEnumConverter cannot be statically analyzed and requires runtime code generation. Consider authoring a custom converter that is not a factory to work around the issue. See https://github.com/dotnet/runtime/issues/73124.")>]
type JsonStringEnumConverter = class
inherit JsonConverterFactory
Public Class JsonStringEnumConverter
Inherits JsonConverterFactory
Public NotInheritable Class JsonStringEnumConverter
Inherits JsonConverterFactory
- 継承
- 属性
注釈
読み取りでは大文字と小文字が区別されません。 書き込みは、 JsonNamingPolicyを使用してカスタマイズできます。
詳細については、「 System.Text.Json を使用してプロパティの名前と値をカスタマイズする方法」を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| JsonStringEnumConverter() |
整数値を許可する既定の名前付けポリシーを使用して、 JsonStringEnumConverter クラスのインスタンスを初期化します。 |
| JsonStringEnumConverter(JsonNamingPolicy, Boolean) |
指定した名前付けポリシーと、未定義の列挙値が許可されるかどうかを示す値を使用して、 JsonStringEnumConverter クラスのインスタンスを初期化します。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Type |
現在のコンバーター インスタンスによって変換される型を取得します。 (継承元 JsonConverterFactory) |
メソッド
| 名前 | 説明 |
|---|---|
| CanConvert(Type) |
指定した型を列挙型に変換できるかどうかを判断します。 |
| CreateConverter(Type, JsonSerializerOptions) |
指定した型のコンバーターを作成します。 |
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |