JsonHelper Class¶
Default implementation of Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper.
- Namespace
Microsoft.AspNetCore.Mvc.ViewFeatures- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class JsonHelper : IJsonHelper
-
class
Microsoft.AspNetCore.Mvc.ViewFeatures.JsonHelper
Constructors¶
-
JsonHelper(Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter, System.Buffers.ArrayPool<System.Char>)¶ Initializes a new instance of
Microsoft.AspNetCore.Mvc.ViewFeatures.JsonHelperthat is backed by <em>jsonOutputFormatter</em>.Arguments: - jsonOutputFormatter (Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter) – The
Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatterused to serialize JSON. - charPool (System.Buffers.ArrayPool<System.Char>) – The
System.Buffers.ArrayPool`1for use with customNewtonsoft.Json.JsonSerializerSettings(seeMicrosoft.AspNetCore.Mvc.ViewFeatures.JsonHelper.Serialize(System.Object,Newtonsoft.Json.JsonSerializerSettings)).
public JsonHelper(JsonOutputFormatter jsonOutputFormatter, ArrayPool<char> charPool)
- jsonOutputFormatter (Microsoft.AspNetCore.Mvc.Formatters.JsonOutputFormatter) – The
-
Methods¶
-
Serialize(System.Object)¶ Return type: Microsoft.AspNetCore.Html.IHtmlContent public IHtmlContent Serialize(object value)
-
Serialize(System.Object, Newtonsoft.Json.JsonSerializerSettings) Return type: Microsoft.AspNetCore.Html.IHtmlContent public IHtmlContent Serialize(object value, JsonSerializerSettings serializerSettings)
-