Class JsonDataResult
Mvc System.Web.Mvc.ActionResult outputting JSON using a json serializer.
Namespace: EPiServer.Shell.Web.Mvc
Assembly: EPiServer.Shell.dll
Version: 7.19.2Syntax
public class JsonDataResult : JsonResult
Constructors
JsonDataResult()
Initializes a new instance of the JsonDataResult class.
Declaration
public JsonDataResult()
JsonDataResult(IObjectSerializer)
Initializes a new instance of the JsonDataResult class.
Declaration
public JsonDataResult(IObjectSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IObjectSerializer | serializer | The serializer. |
JsonDataResult(IObjectSerializerFactory)
Initializes a new instance of the JsonDataResult class.
Declaration
public JsonDataResult(IObjectSerializerFactory serializerFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IObjectSerializerFactory | serializerFactory | The serializer factory to get the registered json serializer from. |
Properties
Serializer
Gets or sets the serializer used when serializing data to the response stream.
Declaration
public virtual IObjectSerializer Serializer { get; set; }
Property Value
| Type | Description |
|---|---|
| IObjectSerializer |
Remarks
If no serializer is set the serializer factory IObjectSerializerFactory registered in Current is queried for a serializer handling Json.
Methods
ExecuteResult(ControllerContext)
Enables processing of the result of an action method by a custom type that inherits from the System.Web.Mvc.ActionResult class.
Declaration
public override void ExecuteResult(ControllerContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Web.Mvc.ControllerContext | context | The context within which the result is executed. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | The |
WriteDataToResponse(HttpResponseBase)
Serializes and writes the EPiServer.Data property value to the response.
Declaration
protected virtual void WriteDataToResponse(HttpResponseBase response)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Web.HttpResponseBase | response | The response. |