JsonTypeInfo.CreateJsonPropertyInfo(Type, String) Methode

Definitie

Hiermee maakt u een leeg JsonPropertyInfo exemplaar voor de huidige JsonTypeInfo.

public:
 System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^ CreateJsonPropertyInfo(Type ^ propertyType, System::String ^ name);
[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 and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name);
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name);
[<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 and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
Public Function CreateJsonPropertyInfo (propertyType As Type, name As String) As JsonPropertyInfo

Parameters

propertyType
Type

Het gedeclareerde type voor de eigenschap.

name
String

De eigenschapsnaam die wordt gebruikt in JSON-serialisatie en deserialisatie.

Retouren

Een leeg JsonPropertyInfo exemplaar.

Kenmerken

Uitzonderingen

propertyType of name is null.

propertyType kan niet worden gebruikt voor serialisatie.

Het JsonTypeInfo exemplaar is vergrendeld voor verdere wijzigingen.

Van toepassing op