Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | JsonResult<T>(T, JsonSerializerSettings, Encoding, ApiController) | Initializes a new instance of the JsonResult<T> class with the values provided. | 
| .jpeg) | JsonResult<T>(T, JsonSerializerSettings, Encoding, HttpRequestMessage) | Initializes a new instance of the JsonResult<T> class with the values provided. | 
See Also
JsonResult<T> Class
System.Web.Http.Results Namespace
Return to top
JsonResult<T> Constructor (T, JsonSerializerSettings, Encoding, ApiController)
Initializes a new instance of the JsonResult<T> class with the values provided.
Syntax
public JsonResult(
    T content,
    JsonSerializerSettings serializerSettings,
    Encoding encoding,
    ApiController controller
)
public:
JsonResult(
    T content,
    JsonSerializerSettings^ serializerSettings,
    Encoding^ encoding,
    ApiController^ controller
)
new : 
        content:'T *
        serializerSettings:JsonSerializerSettings *
        encoding:Encoding *
        controller:ApiController -> JsonResult
Public Sub New (
    content As T,
    serializerSettings As JsonSerializerSettings,
    encoding As Encoding,
    controller As ApiController
)
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.
Syntax
public JsonResult(
    T content,
    JsonSerializerSettings serializerSettings,
    Encoding encoding,
    HttpRequestMessage request
)
public:
JsonResult(
    T content,
    JsonSerializerSettings^ serializerSettings,
    Encoding^ encoding,
    HttpRequestMessage^ request
)
new : 
        content:'T *
        serializerSettings:JsonSerializerSettings *
        encoding:Encoding *
        request:HttpRequestMessage -> JsonResult
Public Sub New (
    content As T,
    serializerSettings As JsonSerializerSettings,
    encoding As Encoding,
    request As HttpRequestMessage
)
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