Aracılığıyla paylaş


JsonHelperExtensions.Serialize Yöntem

Tanım

için valueserileştirilmiş JSON döndürür.

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

Parametreler

jsonHelper
IJsonHelper

IJsonHelper.

value
Object

JSON olarak seri hale getirecek değer.

serializerSettings
Newtonsoft.Json.JsonSerializerSettings

seri Newtonsoft.Json.JsonSerializerSettings hale getirici tarafından kullanılacak.

Döndürülenler

Serileştirilmiş JSON içeren yeni IHtmlContent bir.

Açıklamalar

için serializerSettings değeri Newtonsoft.Json.JsonSerializerSettings.StringEscapeHandling bu yöntem tarafından yoksayılır ve Newtonsoft.Json.StringEscapeHandling.EscapeHtml her zaman kullanılır.

Şunlara uygulanır