IJsonHelper.Serialize Method

Definition

Overloads

Serialize(Object)

Returns serialized JSON for the value.

Serialize(Object, JsonSerializerSettings)

Returns serialized JSON for the value.

Serialize(Object)

Source:
IJsonHelper.cs

Returns serialized JSON for the value.

C#
public Microsoft.AspNetCore.Html.IHtmlContent Serialize (object value);

Parameters

value
Object

The value to serialize as JSON.

Returns

A new IHtmlContent containing the serialized JSON.

Applies to

ASP.NET Core 9.0 ja muut versiot
Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Serialize(Object, JsonSerializerSettings)

Returns serialized JSON for the value.

C#
public Microsoft.AspNetCore.Html.IHtmlContent Serialize (object value, Newtonsoft.Json.JsonSerializerSettings serializerSettings);

Parameters

value
Object

The value to serialize as JSON.

serializerSettings
Newtonsoft.Json.JsonSerializerSettings

The Newtonsoft.Json.JsonSerializerSettings to be used by the serializer.

Returns

A new IHtmlContent containing the serialized JSON.

Applies to

ASP.NET Core 2.2 ja muut versiot
Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2