IJsonHelper Interface

Summary

Base JSON helpers.

Syntax

public interface IJsonHelper

GitHub

View on GitHub

interface Microsoft.AspNet.Mvc.Rendering.IJsonHelper

Methods

Serialize(System.Object)

Returns serialized JSON for the <paramref name=”value” />.

Arguments:
  • value (System.Object) – The value to serialize as JSON.
Return type:

Microsoft.AspNet.Mvc.Rendering.HtmlString

Returns:

A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the serialized JSON.

HtmlString Serialize(object value)
Serialize(System.Object, JsonSerializerSettings)

Returns serialized JSON for the <paramref name=”value” />.

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

Microsoft.AspNet.Mvc.Rendering.HtmlString

Returns:

A new [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) containing the serialized JSON.

HtmlString Serialize(object value, JsonSerializerSettings serializerSettings)