Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Json(Object, String, Encoding, JsonRequestBehavior) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the content type, content encoding, and the JSON request behavior. |
Json(Object, String, JsonRequestBehavior) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified content type and JSON request behavior. |
Json(Object, String, Encoding) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format. |
Json(Object) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON). |
Json(Object, String) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format. |
Json(Object, JsonRequestBehavior) |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified JSON request behavior. |
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the content type, content encoding, and the JSON request behavior.
protected internal virtual System.Web.Mvc.JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding, System.Web.Mvc.JsonRequestBehavior behavior);
abstract member Json : obj * string * System.Text.Encoding * System.Web.Mvc.JsonRequestBehavior -> System.Web.Mvc.JsonResult
override this.Json : obj * string * System.Text.Encoding * System.Web.Mvc.JsonRequestBehavior -> System.Web.Mvc.JsonResult
Protected Friend Overridable Function Json (data As Object, contentType As String, contentEncoding As Encoding, behavior As JsonRequestBehavior) As JsonResult
The JavaScript object graph to serialize.
The content type (MIME type).
The content encoding.
The JSON request behavior
The result object that serializes the specified object to JSON format.
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified content type and JSON request behavior.
protected internal System.Web.Mvc.JsonResult Json(object data, string contentType, System.Web.Mvc.JsonRequestBehavior behavior);
member this.Json : obj * string * System.Web.Mvc.JsonRequestBehavior -> System.Web.Mvc.JsonResult
Protected Friend Function Json (data As Object, contentType As String, behavior As JsonRequestBehavior) As JsonResult
The JavaScript object graph to serialize.
The content type (MIME type).
The JSON request behavior
The result object that serializes the specified object to JSON format.
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format.
protected internal virtual System.Web.Mvc.JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding);
abstract member Json : obj * string * System.Text.Encoding -> System.Web.Mvc.JsonResult
override this.Json : obj * string * System.Text.Encoding -> System.Web.Mvc.JsonResult
Protected Friend Overridable Function Json (data As Object, contentType As String, contentEncoding As Encoding) As JsonResult
The JavaScript object graph to serialize.
The content type (MIME type).
The content encoding.
The JSON result object that serializes the specified object to JSON format.
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON).
protected internal System.Web.Mvc.JsonResult Json(object data);
member this.Json : obj -> System.Web.Mvc.JsonResult
Protected Friend Function Json (data As Object) As JsonResult
The JavaScript object graph to serialize.
The JSON result object that serializes the specified object to JSON format. The result object that is prepared by this method is written to the response by the ASP.NET MVC framework when the object is executed.
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format.
protected internal System.Web.Mvc.JsonResult Json(object data, string contentType);
member this.Json : obj * string -> System.Web.Mvc.JsonResult
Protected Friend Function Json (data As Object, contentType As String) As JsonResult
The JavaScript object graph to serialize.
The content type (MIME type).
The JSON result object that serializes the specified object to JSON format.
Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified JSON request behavior.
protected internal System.Web.Mvc.JsonResult Json(object data, System.Web.Mvc.JsonRequestBehavior behavior);
member this.Json : obj * System.Web.Mvc.JsonRequestBehavior -> System.Web.Mvc.JsonResult
Protected Friend Function Json (data As Object, behavior As JsonRequestBehavior) As JsonResult
The JavaScript object graph to serialize.
The JSON request behavior.
The result object that serializes the specified object to JSON format.
Please sign in to use this experience.
Sign in