Controller::Json Method (Object, String)
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- data
- Type: System::Object
The JavaScript object graph to serialize.
- contentType
- Type: System::String
The content type (MIME type).
Return Value
Type: System.Web.Mvc::JsonResultThe JSON result object that serializes the specified object to JSON format.
Show: