Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

BinaryData.FromObjectAsJson Method

Definition

Namespace:
System
Assembly:
System.Memory.Data.dll
Package:
System.Memory.Data v11.0.0-preview.5.26302.115

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.

Overloads

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

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

FromObjectAsJson<T>(T, JsonSerializerOptions)

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

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

Source:
BinaryData.cs
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.

See also

Applies to

FromObjectAsJson<T>(T, JsonSerializerOptions)

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

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

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed.")]
public static BinaryData FromObjectAsJson<T>(T jsonSerializable, System.Text.Json.JsonSerializerOptions? options = default);
public static BinaryData FromObjectAsJson<T>(T jsonSerializable, System.Text.Json.JsonSerializerOptions? options = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed.")>]
static member FromObjectAsJson : 'T * System.Text.Json.JsonSerializerOptions -> BinaryData
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.

Attributes

See also

Applies to


Feedback

Was this page helpful?