JsonHttpResult<TValue> Class

Definition

An action result which formats the given object as JSON.

C#
public sealed class JsonHttpResult<TValue> : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<TValue>

Type Parameters

TValue
Inheritance
JsonHttpResult<TValue>
Implements

Properties

ContentType

Gets the value for the Content-Type header.

JsonSerializerOptions

Gets or sets the serializer settings.

StatusCode

Gets the HTTP status code.

Value

Gets the object result.

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

Applies to

Product Versions
ASP.NET Core 7.0, 8.0, 9.0