JsonSerializerOptions.Default プロパティ

定義

既定の構成を使用する JsonSerializerOptions の読み取り専用のシングルトン インスタンスを取得します。

public:
 static property System::Text::Json::JsonSerializerOptions ^ Default { System::Text::Json::JsonSerializerOptions ^ get(); };
public static System.Text.Json.JsonSerializerOptions Default { [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] get; }
public static System.Text.Json.JsonSerializerOptions Default { get; }
[<get: System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<get: System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member Default : System.Text.Json.JsonSerializerOptions
static member Default : System.Text.Json.JsonSerializerOptions
Public Shared ReadOnly Property Default As JsonSerializerOptions

プロパティ値

属性

注釈

JsonSerializerOptions インスタンスは独自のシリアル化メタデータ キャッシュをカプセル化するため、必要なたびに新しい既定のインスタンスを使用すると、コンバーターの冗長な再計算が発生する可能性があります。 このプロパティは、コンバーターの再計算を必要とせずに、任意の数のコンポーネントで使用できる共有インスタンスを提供します。

適用対象