Muokkaa

Jaa


BinaryData.FromObjectAsJson Method

Definition

Overloads

FromObjectAsJson<T>(T, JsonSerializerOptions)

Creates a BinaryData instance by serializing the provided object using the JsonSerializer.

FromObjectAsJson<T>(T, JsonTypeInfo<T>)

Creates a BinaryData instance by serializing the provided object using the JsonSerializer.

FromObjectAsJson<T>(T, JsonSerializerOptions)

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

Creates a BinaryData instance by serializing the provided object using the JsonSerializer.

public static BinaryData FromObjectAsJson<T> (T jsonSerializable, System.Text.Json.JsonSerializerOptions? options = default);
static member FromObjectAsJson : 'T * System.Text.Json.JsonSerializerOptions -> BinaryData
Public Shared Function FromObjectAsJson(Of T) (jsonSerializable As T, Optional options As JsonSerializerOptions = Nothing) As BinaryData

Type Parameters

T

The type to use when serializing the data.

Parameters

jsonSerializable
T

The data to use.

options
JsonSerializerOptions

The options to use when serializing to JSON.

Returns

A value representing the UTF-8 encoding of the JSON representation of jsonSerializable.

Applies to

FromObjectAsJson<T>(T, JsonTypeInfo<T>)

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

Creates a BinaryData instance by serializing the provided object using the JsonSerializer.

public:
generic <typename T>
 static BinaryData ^ FromObjectAsJson(T jsonSerializable, System::Text::Json::Serialization::Metadata::JsonTypeInfo<T> ^ jsonTypeInfo);
public static BinaryData FromObjectAsJson<T> (T jsonSerializable, System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo);
static member FromObjectAsJson : 'T * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T> -> BinaryData
Public Shared Function FromObjectAsJson(Of T) (jsonSerializable As T, jsonTypeInfo As JsonTypeInfo(Of T)) As BinaryData

Type Parameters

T

The type to use when serializing the data.

Parameters

jsonSerializable
T

The data to use.

jsonTypeInfo
JsonTypeInfo<T>

The JsonTypeInfo to use when serializing to JSON.

Returns

A value representing the UTF-8 encoding of the JSON representation of jsonSerializable.

Applies to