BinaryData.ToObjectFromJson Method

Definition

Overloads

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.

ToObjectFromJson<T>(JsonSerializerOptions)

Source:
BinaryData.cs
Source:
BinaryData.cs
Source:
BinaryData.cs

Converts the BinaryData to the specified type using JsonSerializer.

C#
public T? ToObjectFromJson<T>(System.Text.Json.JsonSerializerOptions? options = default);

Type Parameters

T

The type that the data should be converted to.

Parameters

options
JsonSerializerOptions

The JsonSerializerOptions to use when serializing to JSON.

Returns

T

The data converted to the specified type.

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

ToObjectFromJson<T>(JsonTypeInfo<T>)

Source:
BinaryData.cs
Source:
BinaryData.cs
Source:
BinaryData.cs

Converts the BinaryData to the specified type using JsonSerializer.

C#
public T? ToObjectFromJson<T>(System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo);

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

T

The data converted to the specified type.

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)