IJsonHelper Interface

Base JSON helpers.

Namespace
Microsoft.AspNetCore.Mvc.Rendering
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

public interface IJsonHelper
interface Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper

Methods

Serialize(System.Object)

Returns serialized JSON for the <em>value</em>.

Arguments:value (System.Object) – The value to serialize as JSON.
Return type:Microsoft.AspNetCore.Html.IHtmlContent
Returns:A new Microsoft.AspNetCore.Html.IHtmlContent containing the serialized JSON.
IHtmlContent Serialize(object value)
Serialize(System.Object, Newtonsoft.Json.JsonSerializerSettings)

Returns serialized JSON for the <em>value</em>.

Arguments:
  • value (System.Object) – The value to serialize as JSON.
  • serializerSettings (Newtonsoft.Json.JsonSerializerSettings) – The Newtonsoft.Json.JsonSerializerSettings to be used by the serializer.
Return type:

Microsoft.AspNetCore.Html.IHtmlContent

Returns:

A new Microsoft.AspNetCore.Html.IHtmlContent containing the serialized JSON.

IHtmlContent Serialize(object value, JsonSerializerSettings serializerSettings)