Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

JsonResult<T> Constructor

 

Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)

NameDescription
System_CAPS_pubmethodJsonResult<T>(T, JsonSerializerSettings^, Encoding^, ApiController^)

Initializes a new instance of the JsonResult<T> class with the values provided.

System_CAPS_pubmethodJsonResult<T>(T, JsonSerializerSettings^, Encoding^, HttpRequestMessage^)

Initializes a new instance of the JsonResult<T> class with the values provided.

Return to top

JsonResult<T> Constructor (T, JsonSerializerSettings^, Encoding^, ApiController^)

Initializes a new instance of the JsonResult<T> class with the values provided.

public:
JsonResult(
	T content,
	JsonSerializerSettings^ serializerSettings,
	Encoding^ encoding,
	ApiController^ controller
)

Parameters

content
Type: T

The content value to serialize in the entity body.

serializerSettings
Type: Newtonsoft.Json::JsonSerializerSettings^

The serializer settings.

encoding
Type: System.Text::Encoding^

The content encoding.

controller
Type: System.Web.Http::ApiController^

The controller from which to obtain the dependencies needed for execution.

Return to top

JsonResult<T> Constructor (T, JsonSerializerSettings^, Encoding^, HttpRequestMessage^)

Initializes a new instance of the JsonResult<T> class with the values provided.

public:
JsonResult(
	T content,
	JsonSerializerSettings^ serializerSettings,
	Encoding^ encoding,
	HttpRequestMessage^ request
)

Parameters

content
Type: T

The content value to serialize in the entity body.

serializerSettings
Type: Newtonsoft.Json::JsonSerializerSettings^

The serializer settings.

encoding
Type: System.Text::Encoding^

The content encoding.

request
Type: System.Net.Http::HttpRequestMessage^

The request message which led to this result.

Return to top
Show: