JsonSerializerOptions.Web Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar en skrivskyddad singleton-instans av JsonSerializerOptions som använder webbkonfigurationen.
public:
static property System::Text::Json::JsonSerializerOptions ^ Web { System::Text::Json::JsonSerializerOptions ^ get(); };
public static System.Text.Json.JsonSerializerOptions Web { [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 Web { 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 Web : System.Text.Json.JsonSerializerOptions
static member Web : System.Text.Json.JsonSerializerOptions
Public Shared ReadOnly Property Web As JsonSerializerOptions
Egenskapsvärde
- Attribut
Kommentarer
Varje JsonSerializerOptions instans kapslar in sina egna serialiseringsmetadatacacheminnen,
så att använda nya standardinstanser varje gång en behövs kan resultera i redundant omkomputation av konverterare.
Den här egenskapen tillhandahåller en delad instans som kan användas av valfritt antal komponenter utan att konverteraren behöver omberäknas.