Table of Contents

Class JsonResult

Namespace
Fdyay.IdentityServer.Hosting
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Writes an object as a JSON response with no-cache headers.

public sealed class JsonResult : IEndpointResult
Inheritance
JsonResult
Implements
Inherited Members

Constructors

JsonResult(object, int)

Holds the object to write.

public JsonResult(object value, int statusCode = 200)

Parameters

value object

The object serialized as the response body, with web defaults and null members left out.

statusCode int

The response's status code. Defaults to 200.

Properties

StatusCode

The status code the response carries.

public int StatusCode { get; }

Property Value

int

Value

What is written as JSON, for a writer of the host's own (IHttpResponseWriter<T>).

public object Value { get; }

Property Value

object

Methods

ExecuteAsync(HttpContext)

Writes the result to the response.

public Task ExecuteAsync(HttpContext context)

Parameters

context HttpContext

The request whose response is written.

Returns

Task