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
valueobjectThe object serialized as the response body, with web defaults and null members left out.
statusCodeintThe response's status code. Defaults to 200.
Properties
StatusCode
The status code the response carries.
public int StatusCode { get; }
Property Value
Value
What is written as JSON, for a writer of the host's own (IHttpResponseWriter<T>).
public object Value { get; }
Property Value
Methods
ExecuteAsync(HttpContext)
Writes the result to the response.
public Task ExecuteAsync(HttpContext context)
Parameters
contextHttpContextThe request whose response is written.