JsonTypeInfo.CreateJsonPropertyInfo(Type, String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a blank JsonPropertyInfo instance for the current JsonTypeInfo.
public:
System::Text::Json::Serialization::Metadata::JsonPropertyInfo ^ CreateJsonPropertyInfo(Type ^ propertyType, System::String ^ name);
public System.Text.Json.Serialization.Metadata.JsonPropertyInfo CreateJsonPropertyInfo(Type propertyType, string name);
member this.CreateJsonPropertyInfo : Type * string -> System.Text.Json.Serialization.Metadata.JsonPropertyInfo
Public Function CreateJsonPropertyInfo (propertyType As Type, name As String) As JsonPropertyInfo
- propertyType
- Type
The declared type for the property.
- name
- String
The property name used in JSON serialization and deserialization.
A blank JsonPropertyInfo instance.
propertyType
or name
is null
.
propertyType
cannot be used for serialization.
The JsonTypeInfo instance has been locked for further modification.
Product | Versions |
---|---|
.NET | 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: