JsonHelper Class

Summary

Default implementation of [Microsoft.AspNet.Mvc.Rendering.IJsonHelper](Microsoft.AspNet.Mvc.Rendering.IJsonHelper.yml).

Syntax

public class JsonHelper : IJsonHelper

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Rendering.JsonHelper

Constructors

JsonHelper(Microsoft.AspNet.Mvc.JsonOutputFormatter)

Initializes a new instance of [Microsoft.AspNet.Mvc.Rendering.JsonHelper](Microsoft.AspNet.Mvc.Rendering.JsonHelper.yml) that is backed by <paramref name=”jsonOutputFormatter” />.

Arguments:
public JsonHelper(JsonOutputFormatter jsonOutputFormatter)

Methods

Serialize(System.Object)
Arguments:
  • value (System.Object) –
Return type:

Microsoft.AspNet.Mvc.Rendering.HtmlString

public HtmlString Serialize(object value)
Serialize(System.Object, JsonSerializerSettings)
Arguments:
  • value (System.Object) –
  • serializerSettings (JsonSerializerSettings) –
Return type:

Microsoft.AspNet.Mvc.Rendering.HtmlString

public HtmlString Serialize(object value, JsonSerializerSettings serializerSettings)