JsonHelperExtensions.Serialize Método

Definição

Retorna JSON serializado para o value.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContent ^ Serialize(Microsoft::AspNetCore::Mvc::Rendering::IJsonHelper ^ jsonHelper, System::Object ^ value, Newtonsoft::Json::JsonSerializerSettings ^ serializerSettings);
public static Microsoft.AspNetCore.Html.IHtmlContent Serialize (this Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper jsonHelper, object value, Newtonsoft.Json.JsonSerializerSettings serializerSettings);
static member Serialize : Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper * obj * Newtonsoft.Json.JsonSerializerSettings -> Microsoft.AspNetCore.Html.IHtmlContent
<Extension()>
Public Function Serialize (jsonHelper As IJsonHelper, value As Object, serializerSettings As JsonSerializerSettings) As IHtmlContent

Parâmetros

jsonHelper
IJsonHelper

O IJsonHelper.

value
Object

O valor a ser serializado como JSON.

serializerSettings
Newtonsoft.Json.JsonSerializerSettings

O Newtonsoft.Json.JsonSerializerSettings a ser usado pelo serializador.

Retornos

Um novo IHtmlContent que contém o JSON serializado.

Comentários

O valor de Newtonsoft.Json.JsonSerializerSettings.StringEscapeHandling de serializerSettings é ignorado por esse método e Newtonsoft.Json.StringEscapeHandling.EscapeHtml é sempre usado.

Aplica-se a