JsonResult 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
動作結果,會將指定的物件格式化為 JSON。
public ref class JsonResult : Microsoft::AspNetCore::Mvc::ActionResult
public ref class JsonResult : Microsoft::AspNetCore::Mvc::ActionResult, Microsoft::AspNetCore::Mvc::IActionResult, Microsoft::AspNetCore::Mvc::Infrastructure::IStatusCodeActionResult
C#
public class JsonResult : Microsoft.AspNetCore.Mvc.ActionResult
C#
public class JsonResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult
type JsonResult = class
inherit ActionResult
type JsonResult = class
inherit ActionResult
interface IStatusCodeActionResult
interface IActionResult
type JsonResult = class
inherit ActionResult
interface IActionResult
interface IStatusCodeActionResult
Public Class JsonResult
Inherits ActionResult
Public Class JsonResult
Inherits ActionResult
Implements IActionResult, IStatusCodeActionResult
- 繼承
- 實作
Json |
使用指定的 |
Json |
使用指定的 |
Json |
使用指定的 |
Content |
取得或設定 , MediaTypeHeaderValue 表示回應的 Content-Type 標頭。 |
Serializer |
取得或設定序列化程式設定。
使用
使用 |
Status |
取得或設定 HTTP 狀態碼。 |
Value |
取得或設定要格式化的值。 |
Execute |
同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 (繼承來源 ActionResult) |
Execute |
以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。 |
產品 | 版本 |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |