BinaryData.ToObjectFromJson 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.
ToObjectFromJson<T>(JsonSerializerOptions) |
Converts the BinaryData to the specified type using JsonSerializer. |
ToObjectFromJson<T>(JsonTypeInfo<T>) |
Converts the BinaryData to the specified type using JsonSerializer. |
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Converts the BinaryData to the specified type using JsonSerializer.
public T? ToObjectFromJson<T>(System.Text.Json.JsonSerializerOptions? options = default);
member this.ToObjectFromJson : System.Text.Json.JsonSerializerOptions -> 'T
Public Function ToObjectFromJson(Of T) (Optional options As JsonSerializerOptions = Nothing) As T
Type Parameters
- T
The type that the data should be converted to.
Parameters
- options
- JsonSerializerOptions
The JsonSerializerOptions to use when serializing to JSON.
Returns
The data converted to the specified type.
Applies to
.NET 10 (package-provided) ja muud versioonid
Toode | Versioonid |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
- Source:
- BinaryData.cs
Converts the BinaryData to the specified type using JsonSerializer.
public:
generic <typename T>
T ToObjectFromJson(System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ jsonTypeInfo);
public T? ToObjectFromJson<T>(System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo);
member this.ToObjectFromJson : System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T> -> 'T
Public Function ToObjectFromJson(Of T) (jsonTypeInfo As JsonTypeInfo(Of T)) As T
Type Parameters
- T
The type that the data should be converted to.
Parameters
- jsonTypeInfo
- JsonTypeInfo<T>
The JsonTypeInfo to use when serializing to JSON.
Returns
The data converted to the specified type.
Applies to
.NET 10 (package-provided) ja muud versioonid
Toode | Versioonid |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: