Dela via


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.

public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ Serialize(System::Object ^ value);
public Microsoft.AspNetCore.Html.IHtmlContent Serialize (object value);
abstract member Serialize : obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function Serialize (value As Object) As IHtmlContent

Parameters

value
Object

The value to serialize as JSON.

Returns

A new IHtmlContent containing the serialized JSON.

Applies to

Serialize(Object, JsonSerializerSettings)

Returns serialized JSON for the value.

public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ Serialize(System::Object ^ value, Newtonsoft::Json::JsonSerializerSettings ^ serializerSettings);
public Microsoft.AspNetCore.Html.IHtmlContent Serialize (object value, Newtonsoft.Json.JsonSerializerSettings serializerSettings);
abstract member Serialize : obj * Newtonsoft.Json.JsonSerializerSettings -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function Serialize (value As Object, serializerSettings As JsonSerializerSettings) As IHtmlContent

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