JsonSerializableAttribute クラス

定義

指定した型のインスタンスとそのオブジェクト グラフ内の型をシリアル化および逆シリアル化するときにパフォーマンスを最適化するために、ソース コードを生成するように System.Text.Json ソース ジェネレーターに指示します。

public ref class JsonSerializableAttribute sealed : System::Text::Json::Serialization::JsonAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)]
public sealed class JsonSerializableAttribute : System.Text.Json.Serialization.JsonAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true)>]
type JsonSerializableAttribute = class
    inherit JsonAttribute
Public NotInheritable Class JsonSerializableAttribute
Inherits JsonAttribute
継承
JsonSerializableAttribute
属性

コンストラクター

名前 説明
JsonSerializableAttribute(Type)

指定した型を使用して、 JsonSerializableAttribute の新しいインスタンスを初期化します。

プロパティ

名前 説明
GenerationMode

ソース ジェネレーターが型に対して生成する必要があることを示すモードを取得または設定します。 値が Defaultの場合は、 GenerationMode で指定された設定が使用されます。

TypeId

派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。

(継承元 Attribute)
TypeInfoPropertyName

生成された派生JsonSerializerContext型の型に対して生成されたJsonTypeInfo<T>のプロパティの名前を取得または設定します。

メソッド

名前 説明
Equals(Object)

このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされた場合、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象