JsonSerializerOptions.Strict Propriedade

Definição

Obtém uma instância JsonSerializerOptions singleton somente leitura que usa a configuração estrita.

public:
 static property System::Text::Json::JsonSerializerOptions ^ Strict { System::Text::Json::JsonSerializerOptions ^ get(); };
public static System.Text.Json.JsonSerializerOptions Strict { [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 Strict { 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 Strict : System.Text.Json.JsonSerializerOptions
static member Strict : System.Text.Json.JsonSerializerOptions
Public Shared ReadOnly Property Strict As JsonSerializerOptions

Valor da propriedade

Atributos

Comentários

Cada JsonSerializerOptions instância encapsula seus próprios caches de metadados de serialização, portanto, o uso de novas instâncias padrão sempre que uma é necessária pode resultar em recomputação redundante de conversores.

Essa propriedade fornece uma instância compartilhada que pode ser consumida por qualquer número de componentes sem exigir nenhuma recomputação de conversor.

Aplica-se a